Lister
Z Shift
- Local time
- Today, 13:25
- Joined
- Aug 24, 2003
- Messages
- 305
Hi everyone.
I have hit a wee issue with an Irish name that I have just never even thought of before.
The UserName is "G O'Conner" and I have a bit of VB that filters for a user along these lines
Since O'Conner has a single quotation embedded within his name I get an error...
Error Number: 3075 ~ Syntax error (missing operator) in query expression...
A silly little error, has anyone struck this before and can let me know what a work around would be?
Cheers
I have hit a wee issue with an Irish name that I have just never even thought of before.
The UserName is "G O'Conner" and I have a bit of VB that filters for a user along these lines
Code:
Dim strName as String
Dim strUserName as String
strUserName = "G O'Conner"
'Function to get the users last name
'Returns "O'Conner"
strName = fGetLastName(strUserName)
strSQL = "SELECT inUserID FROM tbl_Contacts WHERE strLastName LIKE '" & strName & "' AND boRetired = FALSE"
Since O'Conner has a single quotation embedded within his name I get an error...
Error Number: 3075 ~ Syntax error (missing operator) in query expression...
A silly little error, has anyone struck this before and can let me know what a work around would be?
Cheers