G
Gilbert 2097
Hi all... Using Access 2003 VBA I'm doing a conversion from Dbase and I have
set up the following recordset where Lname is the last name being searched
for -
Set rst=CurrentDb.openrecordset("SELECT DonorID,FirstName,LastName FROM
Donors WHERE LastName = '" & Lname & "';")
It works fine except when I get a name with an apostrophe in it like
D'Agostino or D'Ambrosia. It thinks the apostrophe is the end of the search
string and bombs out...How do you allow for this type of thing?? Do I have
to use some other kind of delineater or what?
Thanx for all your help out there!!!
set up the following recordset where Lname is the last name being searched
for -
Set rst=CurrentDb.openrecordset("SELECT DonorID,FirstName,LastName FROM
Donors WHERE LastName = '" & Lname & "';")
It works fine except when I get a name with an apostrophe in it like
D'Agostino or D'Ambrosia. It thinks the apostrophe is the end of the search
string and bombs out...How do you allow for this type of thing?? Do I have
to use some other kind of delineater or what?
Thanx for all your help out there!!!