Make sure your main form isn't Modal. This option can be found in the "Other" properties tab of your Form Properties menu.
Be sure your code to open the query is something like this.
If your query is not a saved queryDef, replace the "qryQueryName" with your query string.
DoCmd.OpenQuery...