QueryDefs and operators

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have an Excel file that runs some VBA to get info from Access. What I have

Set db = CurrentD
Set QDef = db.QueryDefs("MyQuery"
QDef![Enter Grp] =

This works. But I can't fugure out how to run this if I want my parameter to be "<=2" - or any kind of wildcards for that matter

What am I missing

Thank
Dion
 
Dion said:
I have an Excel file that runs some VBA to get info from Access. What I have:

Set db = CurrentDb
Set QDef = db.QueryDefs("MyQuery")
QDef![Enter Grp] = 2

This works. But I can't fugure out how to run this if I want my parameter to be "<=2" - or any kind of wildcards for that matter.

What am I missing?


You can not specify an operator in a query parameter. A
query parameter does not even have to be used in a where
clause comparison.

To do what you're asking you would have to construct the
query's SQL property to include the operators and comparison
values instead of setting a prarameter value.
 
Back
Top