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

Help With Form - Update 1

Status
Not open for further replies.

tpearo

Technical User
Apr 24, 2000
124
US
I have a form where the user inputs data into an underlying table. After inputting the data I need the user to be able to print a report based upon the data just entered. So I have created a report based on a query of the table. I have placed a button on the form that the user clicks on to print report. The query asks for the [Enter the Report #] but when they put in the report # the report prints but no data on the report. If you close the form and then reopen it then click on print report... it prints the report including the data. It appears that the data isn't saved or the query can get the data until the form is closed. Is there something I'm missing or can do so that the user can print the report while still haveing the form open?
Any help would be appreciated.

Tp
 
You may add this line of code before you launch the report:
DoCmd.RunCommand acCmdSaveRecord

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Use the Control Wizard to put a Save Record button on the form. Have the Print Record disabled until they click the Save Record button.

You'll need to modify the code produced by the Wizard to do this:

In the Click event of the Save Record button (get the properties of the button, Events, Click, click the ... at right of that row)

AFTER the code that saves the record,

Me.PrintRecord.Enabled = Yes

Or whatever else the name of the Print Button is.

Frank kegley
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top