R
R. Choate
I have a form with a couple of combos. The first combo filters the available records for the second combo. After update on the 2nd
combo brings up a single record to the form. My problem is that when there is an apostrophe in the text in either combo, it throws
an error of invalid syntax. I understand that the apostrophe is erroneously telling Access that there is text beginning, or
basically serving as a single quote for which there is no matching end quote. Whatever the case, I need to make this work without
eliminating the apostrophe. I'm sure there is a slight adjustment to my syntax which would fix my problem. Here is my current code
for one of the boxes:
If Me.[Tenant].ControlSource = "" Then
DoCmd.ApplyFilter , "find.[Tenant] = '" & Me.[Tenant] & "' AND [find].[Project Name] = '" & Me.[Project Name] & "'"
End If
Please forgive that the combos have improper naming and so forth. I did not build this db and correcting all of its myriad little
"issues" is beyond the scope of my work. Please help me find a way to have it work where I don't get an error when the filter
requires "Taylor's" = "Taylor's" and so forth.
combo brings up a single record to the form. My problem is that when there is an apostrophe in the text in either combo, it throws
an error of invalid syntax. I understand that the apostrophe is erroneously telling Access that there is text beginning, or
basically serving as a single quote for which there is no matching end quote. Whatever the case, I need to make this work without
eliminating the apostrophe. I'm sure there is a slight adjustment to my syntax which would fix my problem. Here is my current code
for one of the boxes:
If Me.[Tenant].ControlSource = "" Then
DoCmd.ApplyFilter , "find.[Tenant] = '" & Me.[Tenant] & "' AND [find].[Project Name] = '" & Me.[Project Name] & "'"
End If
Please forgive that the combos have improper naming and so forth. I did not build this db and correcting all of its myriad little
"issues" is beyond the scope of my work. Please help me find a way to have it work where I don't get an error when the filter
requires "Taylor's" = "Taylor's" and so forth.