swimehdi
asked on
If Statement Access Query
Hello Expert,
I am trying to develop an if statement for my form in VBA:
If Query "XYZ" is open then DoCmd.CloseQuery "XYZ"
Not sure if possible. I appreciate your help.
I am trying to develop an if statement for my form in VBA:
If Query "XYZ" is open then DoCmd.CloseQuery "XYZ"
Not sure if possible. I appreciate your help.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
sorry, it was a typo error on my part..
ASKER
The VBA wording that worked for me is:
DoCmd.Close acQuery, "XYZ"
and NOT
DoCmd.CloseQuery "XYZ"
Expert's suggestion helped.
DoCmd.Close acQuery, "XYZ"
and NOT
DoCmd.CloseQuery "XYZ"
Expert's suggestion helped.