dragonsbb16
New member
- Local time
- Today, 06:41
- Joined
- Apr 17, 2006
- Messages
- 3
i have a access application that does a simple filter
here is my code..
dim filter as a sting
filter = "CenterName = '" & NameSel.Value & "'"
DoCmd.OpenForm FormName
DoCmd.ApplyFilter , filter
DoCmd.close acForm, FormName2
This function works fine UNTIL
NameSel.Value = "Adult's"
And the reason is b/c there is a single quote in the value...what is the best way to solve this? Any help would be great. thanks.
here is my code..
dim filter as a sting
filter = "CenterName = '" & NameSel.Value & "'"
DoCmd.OpenForm FormName
DoCmd.ApplyFilter , filter
DoCmd.close acForm, FormName2
This function works fine UNTIL
NameSel.Value = "Adult's"
And the reason is b/c there is a single quote in the value...what is the best way to solve this? Any help would be great. thanks.