I built an Access database that stores our "Office Supplies" with several reports that when generated I can "Double-Click" a line item in that report and open it's corresponding record in a form. I did this using a macro in the Double Click 'Event' Property.
It was giving a syntax error when it encountered any record had an apostrophe within the ItemName field. To get around this I wrote the macro:
="[ItemName]=" & Chr(34) & [ItemName] & Chr(34)
This worked great! But I recently found out that I got the same Macro Syntax error when it encountered a quote (") symbol in the ItemName field of any record.
My question is: How can I properly incorporate both Chr(34) AND Chr(39) strings in this Event macro?
I have tried every way I know of to And/Or it but have been failing miserably. What is the right way to do this?