I am having an issue with names that contain an apostrophe. The code functions fine with (Jeff Flake) but not for (Tom O'Halleran).
ThanxsCode:DoCmd.OpenForm "PoliticianDataF", , , "[President]=" & "'" & [Politician] & "'"
Jim O
apostrophe
I am having an issue with names that contain an apostrophe. The code functions fine with (Jeff Flake) but not for (Tom O'Halleran).
ThanxsCode:DoCmd.OpenForm "PoliticianDataF", , , "[President]=" & "'" & [Politician] & "'"
Jim O
apostrophe
try
Code:DoCmd.OpenForm "PoliticianDataF", , , "[President]= """ & [Politician] & """"
Thank you, that does the trick.
Jim O