R
Richard Hollenbeck
I have a series of DAO.Recordsets querying different fields and concatinates
the results into a string variable. That string variable goes into a text
box. So it goes something like this:
lname & ", " & fname & vbcrlf & address1 & vbcrlf .... etc., etc., etc.
But if the name in the lname field contains an apostrophe, such as, "Jack's
Liquor" or "Jill's Nursery," I get a big error. Error number 3075 - missing
operator in expression. It sees the apostrophe and
wiggs-out. Is there a way I can trap that error and programatically fix it
on the fly? Or do I have to prohibit apostrophes in the field? Some
programming languages make use of a backslash to get the program to ignore
the next character. Does VBA have anything like that? If not, what is the
best solution?
Thanks.
Rich Hollenbeck
the results into a string variable. That string variable goes into a text
box. So it goes something like this:
lname & ", " & fname & vbcrlf & address1 & vbcrlf .... etc., etc., etc.
But if the name in the lname field contains an apostrophe, such as, "Jack's
Liquor" or "Jill's Nursery," I get a big error. Error number 3075 - missing
operator in expression. It sees the apostrophe and
wiggs-out. Is there a way I can trap that error and programatically fix it
on the fly? Or do I have to prohibit apostrophes in the field? Some
programming languages make use of a backslash to get the program to ignore
the next character. Does VBA have anything like that? If not, what is the
best solution?
Thanks.
Rich Hollenbeck