I have an Excel 2000 file set up to query an Acess 2000 database. The code works fine, but now I need the ability to query the database table based on a variable. Below is my current code and where I set the variable and think the variable should be in the query string(highlighted in red):
strTerr is where my variable is stored and is a 4 digit code that is formatted as Text because strTerr could begin with a 0, ie 0214. When I run the code as given above, I get "SQL Syntax Error." I think I'm on the right track, but cannot figure out the correct syntax, any ideas?
Your help is greatly appreciated. Thanks
Bookmarks