Can anyone help me 
I'm trying to use docmd.runsql to add a string into a table.
Problem is my strings contain ' (single quotes) " (double quotes)
and , (comma's)
This really screws up my docmd.runsql line of code.
i.e
TempString = "Hello' My ,Name 'Is "
docmd.runsql "INSERT INTO tbl (field) VALUES(' & Tempstring & ');"
doesnt work
I get this message
Runtime Error 3075 Syntax Error Missing Operator
Can I get round this easily as my sql is a touch more complex than the example.
Thanks

I'm trying to use docmd.runsql to add a string into a table.
Problem is my strings contain ' (single quotes) " (double quotes)
and , (comma's)
This really screws up my docmd.runsql line of code.
i.e
TempString = "Hello' My ,Name 'Is "
docmd.runsql "INSERT INTO tbl (field) VALUES(' & Tempstring & ');"
doesnt work
I get this message
Runtime Error 3075 Syntax Error Missing Operator
Can I get round this easily as my sql is a touch more complex than the example.
Thanks
Last edited: