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!

report w/3 subreports-print parameters appear twice 2

Status
Not open for further replies.

kentwoodjean

Technical User
Oct 19, 2002
376
US
I have a problem that I thought was solved but has popped up again. My report is made up of 3 sub-reports, but only 1 of the sub reports uses the date parmater, while the other 2 are real time as of the current date.

Following is the entry on my parameter query:

Between [Forms]![DateForm]![Begin Date] And [Forms]![DateForm]![End Date]

From the switchboard, by button Opens the DateForm. I make my 2 date entries that populate unbound text boxes. My preview report button on this form is as folows:

Private Sub Command8_Click()
On Error GoTo Err_Command8_Click

Dim stDocName As String

stDocName = "SummPendCombined"
DoCmd.OpenReport stDocName, acPreview
DoCmd.Close acForm, "DateForm"

Exit_Command8_Click:
Exit Sub

Err_Command8_Click:
MsgBox Err.Description
Resume Exit_Command8_Click

End Sub

Everything works great up to this point. When I hit the print box and OK, a second box with the Parameter Details as on the Query appears and unless it is filled in, I do not get my information on the 1 subreport.

I could have sworn it was working but maybe I just imagined it. Any Ideas??
 
you've closed the DateForm which contains the textBoxes for your parameters, so on print, it doesn't see the parameters and prompts for them.

remember every time you change the views, i.e. preview -> print, you're actually regenerating the report from scratch.

to get around this, don't close the form until later...

--------------------
Procrastinate Now!
 
That makes sense. What I was trying to do is have the form close at the time the report would open so that the user would not also have to take that the DateForm would not be left open and therefore an additional step by the user to close. Any way around that?
 
use the onExit event of the report to close the input form

--------------------
Procrastinate Now!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top