klwu
04-27-2005, 05:31 PM
Hey, I am using VBA codes to insert data into the tables, however I found out one problem......when I try to insert ('), the code returns error.......but for quotation (") is fine.......my code is as follows:
sql = "INSERT INTO M_Stock (StockRef, StockDesc) VALUES ('" & txtStockRef & "', '" & txtStockDesc & "');"
set dbs = currentdb
dbs.execute sql
How do I change the code so that it will accept any symbol?? Thanks so much
sql = "INSERT INTO M_Stock (StockRef, StockDesc) VALUES ('" & txtStockRef & "', '" & txtStockDesc & "');"
set dbs = currentdb
dbs.execute sql
How do I change the code so that it will accept any symbol?? Thanks so much