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

how to stop query from displaying when running report 1

Status
Not open for further replies.

topwaya

Technical User
May 4, 2005
150
US
Probably a stupid question - but I can't find any information on it.

When I run a report, after I close the report, the query is displaying behind it. I don't want my end users to see this. Will this go away when I make a front/back end? Or do I need to do something to the reports?

Thank you for any help!!
 
how are you activating the reports?

because normally, the report doesn't activate the query it's based on at all...

--------------------
Procrastinate Now!
 
I'm activating the report from a switchboard. The report has an OnOpen Event that opens a form dialog box that the user can input dates and the report displays the records between those dates.

here is my OnOpen Event:

Code:
Private Sub Report_Open(Cancel As Integer)
   ' Set public variable to true to indicate that the report
   ' is in the Open event
   bInReportOpenEvent = True
   
   ' Open Sales By Category Dialog
   DoCmd.OpenForm "fdlgNL", , , , , acDialog

   ' Cancel Report if User Clicked the Cancel Button
   If IsLoaded("fdlgNL") = False Then Cancel = True

   ' Set public variable to false to indicate that the
   ' Open event is completed
   bInReportOpenEvent = False
End Sub

Thank you for trying to help!
 
what about the code in the switchboard which opens the report?

I can't see anything in there that would open up the underlying query...

--------------------
Procrastinate Now!
 
Silly me - it's not from the switchboard, but from the form dialog box where the parameter dates are entered.

The "search" command button has the following On Click Event:

Code:
Private Sub Search_Click()
   Me.Visible = False
   DoCmd.OpenQuery "qfltNLParticipants", acViewNormal, acEdit
   DoCmd.CLOSE acForm, "qfltNLParticipants"
End Sub

Is there a better way for me to design this? Or do I just put some more code somewhere to close the query?

Thanks so much!




 
normally what I do with reports is to have a report form where the values necessary are entered onto controls on this form, and a button which only opens the report...

and in the underlying query itself, any needed values are referenced directly from the form...

--------------------
Procrastinate Now!
 
Thank you, I will try that - I think I did it with another report - thanks *very* much!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top