View Single Post
  #7 (permalink)  
Old February 14th, 2006, 12:21 PM
SerranoG SerranoG is offline
Friend of Wrox
Points: 4,007, Level: 26
Points: 4,007, Level: 26 Points: 4,007, Level: 26 Points: 4,007, Level: 26
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Lansing, Michigan, USA.
Posts: 1,151
Thanks: 2
Thanked 14 Times in 14 Posts
Send a message via ICQ to SerranoG Send a message via AIM to SerranoG
Default

Although Kindler's suggestion will work, it's kinda overkill. You just need one command line.

To print a report for one record showing on Form2 based on a print button on Form 1 you need only just set a WHERE parameter on the command to print. That is, on Form 1's print button's ON CLICK event, you put something like

DoCmd.OpenReport "Name of Report", acPrintPreview, , "[lngRecNo] = " & Forms.Form2.Form.txtRecNo

Where you replace "Name of Report" with the name of the report; and you replace lngRecNo with the real field in Form2 corresponding with that record number; and you replace Form2 with the real name of your second form; and you replace txtRecNo with the real name of the textbox in Form2 that holds the record number bound to lngRecNo.
Reply With Quote