View Full Version : Magic report


elgoober
03-19-2008, 05:07 AM
Hi

I have a report based on user input through a series of forms.

At the end of the process they hit a cmd button which closes all the form's and (alledgedly saves all the data) then they hit a second cmd button which opens the report.

Problem is - when you open the report - there's a series of error's, as if the data has not been saved.

When you close the report and reopen (manually)- all the data appears (as if by magic).

Any ideas gratefully accepted.

Cheers

Paul

statsman
03-20-2008, 05:34 PM
Just because you entered the data on the form, the data isn't saved yet.
Before you can print the report you have to save the record.

Try this:
With your form in design view, right click on the print command button. Select Build Event, then Code Builder.

In the code for your button enter
Do.Cmd SaveRecord
In the line before the code orders the report printed.

elgoober
03-21-2008, 12:55 PM
cheers statsman