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

Printing a Single Record From Print Button

Status
Not open for further replies.

Donamese

Technical User
Jan 16, 2003
12
US
I have a form used for call monitoring. It has 2 buttons, one to "save" which sends information to the master table then clears the form for a new entry; then the second button to print the form.

When entries are made they get printed then saved. However, when you click the print button it will print every record entered in that session. If you close the database then reopen it, only the single form prints. If you enter save multiple forms it will continue to print from the first one entered. How can I get it to only print the current form?
 
Use this, swapping out the names for yours.

Call DoCmd.OpenReport("ReportName", , , "FieldName = " & Me!ControlName)

If your key field is text instead of numeric, use this:
Call DoCmd.OpenReport("ReportName", , , "FieldName = '" & Me!ControlName & "'")

Jeremy =============
Jeremy Wallace
AlphaBet City Dataworks

Take a look at the Developers' section of the site for some helpful fundamentals.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top