Problem calling a query from a form command statement

K

keith

hello,
I am trying to call a query from a form control Command1

in the code I have the following statement

DoCmd.OpenQuery "q_myquery"

where q_myquery is the exact name of the query. I know it is exact because
I copied and pasted it from the query name into the statement.

This statement returns an error with no message

what is the most likely problem, and what can I do about it?

Thank you,

keith
 
K

kingston via AccessMonster.com

Things to check:
Can you open the query independently of the command?
Is the query already open (in design mode)?
Compact and repair your database.
 
K

keith

Thank you very much. This was helpful.
Keith

kingston via AccessMonster.com said:
Things to check:
Can you open the query independently of the command?
Is the query already open (in design mode)?
Compact and repair your database.
 
Top