I'm using excel to input data into an Access database and some of my data strings contain an apostrophe for measurements.
This is my SQL input string
stSQL = "INSERT INTO Products (ProductName, ProductDescription, ProductUnit, SupplierID) " & _
"Values ('" & cboxItemNum & "', '" & txtDescription & "', '" & txtUnit & "', " & linkPID & ")"
cn.Execute (stSQL)
My string is as follows:
Aliplast 4E White. 30" X 80' X 1/4" Soft.
In this string the ' after the 80 is causing the error and I'm not sure how to get around this. I can't just tell the user not to enter an apostrophe. How can I get around this?
Thanks