Hi to all,
I have an MS-Access Query that accepts a date parameter. If the view is opened in MS-Access, it works fine. You can enter for the parameter.
But how do I pass the parameter from VB Code to retrieve the Query?
Here is my Code:
ObjCon.Open ConnectionString
SQL = "SELECT * FROM qrySALES"
Set RS = ObjCon.Execute(SQL)
... do something here...
RS.Close
ObjCon.Close
Set RS = Nothing
Set ObjCon = Nothing
Where:
qrySALES is a QUERY from MS-Access that accepts a date parameter.
I tried to place a WHERE clause in the SQL statement but it create a syntax error.
Thanks in Advance,
Noel