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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Inserting "Invalid Characters" into an Access database

Status
Not open for further replies.

WozFromOz

Programmer
Mar 31, 2001
16
AU
I am wishing to input pure text from a form into an Access 97 Database using Insert Record. The challenge is the so called "invalid characters" and how to successfully input them.

The main protagonists seem to be Single Quote (') and Commer (,). I am dealing with Single Quotes by replacing them with two Single Quotes thus

Code:
strInfo = Replace (strInfo, "'", "''")

however the Commer has me stumped as it tricks the SQL into thinking there are more values than fields even if surrounded by Single Quotes.

How do I deal with the Commer and what other Invalid Characters do I need to look out for?

Thanks
WozFromOz
 
You could replace it with it's ascii equivalent...?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top