I been trying to use as much code as possible on the back end of my forms. I was wondering if you had any suggestion to cleaning up the appearance of the way my database functions.
Basically I don't want all of these query windows opening and minimizing as I am currently doing in this procedure. I would like everything to happen behind the scenes so to speak and not visible to the user if at all possible.
Here is an example of what I am talking about, any help is appreciated.
Private Sub cmdLiteraturePullReport_Click()
DoCmd.OpenQuery "qryLiteraturePullreportCustomer", acNormal, acEdit
DoCmd.Minimize
DoCmd.OpenQuery "qryLiteraturePullReportLead", acNormal, acEdit
DoCmd.Minimize
DoCmd.OpenQuery "qryLiteraturePullReportLeadCustomerUPS", acNormal, acEdit
DoCmd.Minimize
DoCmd.OpenReport "rptLiteraturePullReportCustomerRep", acNormal, "", ""
DoCmd.OpenReport "rptLiteraturePullReportLead", acNormal, "", ""
DoCmd.OpenReport "rptLiteraturePullReportLeadCustomerUPS", acNormal, "", ""
DoCmd.Close acQuery, "qryLiteraturePullreportCustomer"
Close
cmdLiteraturePullReport_Exit:
Exit Sub
cmdLiteraturePullReport_Err:
MsgBox Error$
Resume cmdLiteraturePullReport_Exit
End Sub
[sig][/sig]
Basically I don't want all of these query windows opening and minimizing as I am currently doing in this procedure. I would like everything to happen behind the scenes so to speak and not visible to the user if at all possible.
Here is an example of what I am talking about, any help is appreciated.
Private Sub cmdLiteraturePullReport_Click()
DoCmd.OpenQuery "qryLiteraturePullreportCustomer", acNormal, acEdit
DoCmd.Minimize
DoCmd.OpenQuery "qryLiteraturePullReportLead", acNormal, acEdit
DoCmd.Minimize
DoCmd.OpenQuery "qryLiteraturePullReportLeadCustomerUPS", acNormal, acEdit
DoCmd.Minimize
DoCmd.OpenReport "rptLiteraturePullReportCustomerRep", acNormal, "", ""
DoCmd.OpenReport "rptLiteraturePullReportLead", acNormal, "", ""
DoCmd.OpenReport "rptLiteraturePullReportLeadCustomerUPS", acNormal, "", ""
DoCmd.Close acQuery, "qryLiteraturePullreportCustomer"
Close
cmdLiteraturePullReport_Exit:
Exit Sub
cmdLiteraturePullReport_Err:
MsgBox Error$
Resume cmdLiteraturePullReport_Exit
End Sub
[sig][/sig]