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

Printing Report from Form

Status
Not open for further replies.

bborel

Technical User
Jan 20, 2004
16
0
0
US
I have a form I've created and need to be able to print a report from it based upon the current data. I've tried eveything and I'm stumped. The control I'd like to have the focus on for the report is a auto number field called WORK_ORDER. I'm having to use Access 95 for this.

Perfect scenario is the data is input and the WORK_ORDER field is an auto number that is not enabled. Once the data is input I'd like to click PRINT button and only current record prints our using report instead of form.
 
Hi,

First, has the record on the form been saved? (docmd.save will do that), otherwise the record won't exist yet and the report won't be able to run properly.

Then it should be as simple as:
DoCmd.OpenReport "YourReportName", acViewNormal, "[YourReportControlName] = " & Forms!yourForm!WORK_ORDER

hope this helps

Steve
 
Thanks, I didn't think about that. I'll try that and hopefully it will work, thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top