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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Report automatically prints when opened

Status
Not open for further replies.

lexis7

Programmer
Sep 23, 2002
26
US
I have a form that allows someone to choose from three options(option buttons), one of them being "All Open Invoices". When that option is selected and the user hits Enter(command button)I want the report "Open Invoices" which is based on a query, to open on the screen. My problem is that when that option is selected, the report automatically prints out without even showing the report. My code is below. Any help would be great!

Private Sub cmdEnter_Click()
Select Case Me!Frame2
Case 1
DoCmd.OpenForm "Enter New Invoices"

Case 2
DoCmd.OpenForm "Search Invoices"

Case 3
DoCmd.OpenReport "Open Invoices"


End Select
End Sub
 
Change the Case 3 to:



DoCmd.OpenReport "Open Invoices", acPreview

That will cause the report to be brought up on the screen...

--James

junior1544@jmjpc.net
Life is change. To deny change is to deny life.
 
Thanks so much! I knew it was really simple! I was just thinking too hard.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top