aziz rasul
Active member
- Local time
- Today, 21:41
- Joined
- Jun 26, 2000
- Messages
- 1,935
I have the following code
Everything work fine if strGroupName is
FABtots - Childrens & Play Centre
But if strGroupName is
FABtots - Children's & Play Centre
then it doesn't as I have an apostrophe in the strGroupName.
How do I amend the SQL code to accommodate this and potentially any other irregular characters?
Code:
strSQL = "UPDATE tblEnquirers SET tblEnquirers.Comments = [Comments] & ' The enquirer was removed from the FABtots sessions for the """ & strGroupName & """ group on " & Format(Date, "dd/mm/yy") & ".' WHERE (((tblEnquirers.enquirerID)=" & lngEnquirerID & "));"
CurrentDb.Execute strSQL
Everything work fine if strGroupName is
FABtots - Childrens & Play Centre
But if strGroupName is
FABtots - Children's & Play Centre
then it doesn't as I have an apostrophe in the strGroupName.
How do I amend the SQL code to accommodate this and potentially any other irregular characters?