ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Wildcard character with Select Statement (https://www.excelbanter.com/excel-programming/285307-wildcard-character-select-statement.html)

mike

Wildcard character with Select Statement
 
What is wrong with my snytax? I've created a macro to
retrieve info from an Access table. Here is the query
passed to the connection object:

strSQL = "SELECT value FROM " & strTable & " WHERE
PageRef LIKE '??10'"

shockley

Wildcard character with Select Statement
 
Your SQL statement works for me as printed (I created a database to test
it). What is the exact error message you are getting?

strSQL = "SELECT Value FROM " & strTable & _
" WHERE PageRef LIKE '??10'"

Shockley


"Mike" wrote in message
...
What is wrong with my snytax? I've created a macro to
retrieve info from an Access table. Here is the query
passed to the connection object:

strSQL = "SELECT value FROM " & strTable & " WHERE
PageRef LIKE '??10'"





All times are GMT +1. The time now is 03:31 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com