Code:
SQL = "SELECT * FROM " & strTable & " WHERE Area = '" & Sheets("Sheet1").Range("A1") & "' AND Place =" & Sheets("Sheet1").Range("A2") & ""
Dear Gurus
Please help on the above error, I have attached my file as well.
I am trying to get data from a table in access database. All my parameters are in excel VBA and excel cells.
In the above code when I type exact matching parameter thequery works but when I put "*" to select all from a column it is not returning any values. Can you please help me on this.
So that If I can give parameter to Area like "IT " and parameter for place will be '*' to select Area as IT and places includes All.
Many thanks for your help in Advance.
Attachments
Last edited: