Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ADO FIND - trouble using strings that contain " ' "

Status
Not open for further replies.

KirkJewell

Programmer
Oct 6, 2000
54
GB
This seems like a basic problem to me - I don't understand why I haven't come across it before.

Using ADO.find = "StaffName = '" & string & "'"
works fine for a string that doesn't have an "'" in it.

But the StaffName column include names like "John O'Carrol" and the additional "'" causes an error.

Can anyone suggest a way around this.

Regards
Kirk
 
Wherever you have a quote like ', use two single quotes ''
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top