Stuart Green
Registered User.
- Local time
- Today, 12:14
- Joined
- Jun 24, 2002
- Messages
- 108
I was kindly helped out here with a problem I had wanting to put a print button on a form so that it only prints the record on screen. The code I ended up with that works is as follows
Private Sub printbutton_Click()
DoCmd.OpenReport "rpt_each_property2", acPreview, , "ref=[forms]![frm_each_property]![ref]"
End Sub
Now this works great when I am going through the form frm_each_property on its own, but I would like to use it as a sub form. (I have one unique record of a person who may own several properties). I want to pull up that persons record, navigate through their properties in the sub form until I get to the one that I want and then print off that particular property record. When I try the button as a sub form I am prompted to enter the criteria forms!frm_each_property!ref. Any suggestions please as to how I can do this
Private Sub printbutton_Click()
DoCmd.OpenReport "rpt_each_property2", acPreview, , "ref=[forms]![frm_each_property]![ref]"
End Sub
Now this works great when I am going through the form frm_each_property on its own, but I would like to use it as a sub form. (I have one unique record of a person who may own several properties). I want to pull up that persons record, navigate through their properties in the sub form until I get to the one that I want and then print off that particular property record. When I try the button as a sub form I am prompted to enter the criteria forms!frm_each_property!ref. Any suggestions please as to how I can do this