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

String value contains quote

Status
Not open for further replies.

Fae

Instructor
Nov 28, 2002
34
0
0
US
In Access 2000 using VBA

I have a string value e.g.
500mg Litchi "A" duplex box (string value uses double quotes) or
or 500mg Litchi 'A' duplex box (string value uses single quote)

How do I insert that record (which can be either the one or the other - indicated above) into a table using VBA.

Thanks




Miracles we do immediately ...
imposibilities take a little longer.
 
This is the scenario :

'update temp table
'code snippet...
cm.CommandText = "insert into mytable (code, product) values ('" & strCode & "', '" & strProduct & "')"
cm.CommandType = adcmdText
cm.ActiveConnection = cnn
cm.Execute


Miracles we do immediately ...
imposibilities take a little longer.
 
Take a look at faq709-1526.

Thanks and Good Luck!

zemp
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top