Hello,
I have the following code behind a command button on a PopUp form to open a report. The issue is that it also opens a query. I only want the report to open not the query. Can someone tell me what I have done wrong in the code below. Thank you for your help.
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryRptErrors" 'Make Table Query
DoCmd.OpenQuery "qryCountOfLists" 'Make Table Query
DoCmd.OpenQuery "qryTotalLists" 'Select Query
DoCmd.Close acQuery, "qryTotalLists"
DoCmd.OpenReport "Error Detail Report", acViewPreview
DoCmd.SetWarnings True
DoCmd.Close acForm, "PopUp Form"