I created a search tool and it would error whenever there was an apostrophe in their name... either company, first or last or even address.
I figured it was because of this part of the code:
Where if there was an apostrophe it would cut the code short (i.e. the closing apostrophe of the string)
I need to prevent entries of apostrophe somehow... like an invalid key?
or a checking error? (like if someone typed O'Neil and tried to go to another control it would tell the user to remove the ')
I figured it was because of this part of the code:
Code:
Me.RecordsetClone.FindFirst " CompanyName = '" & Me.SearchBox & "'"
Where if there was an apostrophe it would cut the code short (i.e. the closing apostrophe of the string)
I need to prevent entries of apostrophe somehow... like an invalid key?
or a checking error? (like if someone typed O'Neil and tried to go to another control it would tell the user to remove the ')