Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report Filter from FancyPrairie

Status
Not open for further replies.

roundup

Programmer
Dec 4, 2008
3
US
Hi FancyPrairie,

I am using your code to filter a report from

I am using 4 combo boxes and a text box.

Everything works fine except for one of the combo boxes contains items with an apostrophe. The apostrophe triggers an error:

Run-time error '3075':

Syntax error (missing operator) in query expression
'([ChemSheet].[Field Name]='Norma's Home QTR')'.

How do I fix this problem?

Thanks
 
How are ya roundup . . .

Try this:
Code:
[blue]   ="'" & replace("Norma's Home QTR","'","''") & "'"[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Where do I insert this code?

I am not very experienced. Sorry.

Thanks for your help!
 
roundup . . .

What I posted wasn't necessary:
Code:
[blue] Replace ([ChemSheet].[Field Name]='Norma's Home QTR')
With    ([ChemSheet].[Field Name]='Norma'[purple][b]'[/b][/purple]s Home QTR')[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997 [blue]Worthy Reading![/blue] [thumbsup2]
Also faq181-2886 [blue]Worthy Reading![/blue] [thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top