L
learning_codes
Hi,
I am able to run the queries without quote but not has the quote. I
hope you can help me to solve this for me.
Product Name has the single quote like: John Simth's
I'm not able to run the query for John's Smith's but all other queries
works for without quote.
The error message comes from the line of code: (([Order].ProductName)=
"' & strProduct & '"))
Here is the code:
***********************************************************
strTemp_Product = dbs.TableDefs(0).Name
strSQL_Product = "SELECT [ProductDescriptions]
FROM [Order]
WHERE ((([Order].[ProductGroup]) = 'Outdoor') AND
(([Order].ProductName)= '" & strProduct & "'))
ORDER BY [Order].ProductName;"
strTemp_Product = dbs.TableDefs(1).Name
Set qdf_Product = dbs_Product.CreateQueryDef(strQName_Product,
strSQL_Product)
qdf_Product.Close
**************************************************************************
Your help would be much appreciated.
Thanks
I am able to run the queries without quote but not has the quote. I
hope you can help me to solve this for me.
Product Name has the single quote like: John Simth's
I'm not able to run the query for John's Smith's but all other queries
works for without quote.
The error message comes from the line of code: (([Order].ProductName)=
"' & strProduct & '"))
Here is the code:
***********************************************************
strTemp_Product = dbs.TableDefs(0).Name
strSQL_Product = "SELECT [ProductDescriptions]
FROM [Order]
WHERE ((([Order].[ProductGroup]) = 'Outdoor') AND
(([Order].ProductName)= '" & strProduct & "'))
ORDER BY [Order].ProductName;"
strTemp_Product = dbs.TableDefs(1).Name
Set qdf_Product = dbs_Product.CreateQueryDef(strQName_Product,
strSQL_Product)
qdf_Product.Close
**************************************************************************
Your help would be much appreciated.
Thanks