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

What is the best way to create a report based on one record? 2

Status
Not open for further replies.

doctorjman

Technical User
Jul 27, 2001
2
US
I am developing a database that tracks sales and inventories. I need to create several reports that are based on one record like an invoice or bill of lading. What is the best way to create it?
 
Create the report as you normally would. Then from the screen that displays the individual record (i.e. Form) add a button to open the report. The wizard should prompt you if you want to limit the report based on the current record. If it doesn't you can manually add the where claus to the line of code that opens the report. To do this use the following syntax:

Docmd.OpenReport "ReportName", acViewPreview, , "[Primarykey] = " & Me.PrimaryKey

Substitute your report name and record id for the placeholders given.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top