Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

cleaning up my code

Status
Not open for further replies.

DBritter

Technical User
Joined
Jun 28, 2000
Messages
37
Location
US
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]
 
Just a couple of questions, do your reports use the queries?
Have you tried to change the report data source?
From what I can see it looks like you are just printing three reports. You should be able to just print the reports without calling the queries. [sig]<p>John A. Gilman<br><a href=mailto:gms@uslink.net>gms@uslink.net</a><br>[/sig]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top