Passing data from form to report

dcjones

Dereck
Local time
Today, 11:37
Joined
Mar 10, 2004
Messages
108
Hi all,

I have a popup form which accepts input from the use, dates.

There are two fields of the form, comba28 = From Date and combo30 = To Date

The user enters the the From Date and To Date and then click on a command button which loads a Report.

The Report loads a few Sub-Reports and all the correct data is shown. At this point the popup form which held the user input has now closed.

If I try and print the Report I am asked for the input dates so all the sub-reports can run thier queries again to collect the required data.

How can I keep the orginal user input so that the "Printg Report" has access to the data.


Any help would be good.

Kind regards, keep safe and well.

Dereck
 
Hi Dereck
I might be off the wall here. Sounds like you are populating the report with dates directly from the pop-up. If so, you need to print the report before your pop-up window closes and then close the pop-up after your report has printed.
Alternatively use the pop-up to populate a temporary table and then use this table to populate the report. If using this you need to remember to clear down the data after the report has been printed or else you will geta conflict when you run it next time.
I think the first option is better.

Open report
Open pop-up
Populate pop-up
Verfiy report now OK (but without closing pop-up)
Print report
Close report
Close pop-up

Hope this is of some help
Best wishes
 
Hi Malcy

I should have known, yes your reply works OK.

I have my event set to preview the form and there is no reason why
the user should see a preview.

Many thanks

Dereck
 
It's nice (albeit unusual) when things work out easy!
Good luck
 

Users who are viewing this thread

Back
Top Bottom