Easy printing of 1 record instead of all records

kivirtan

Registered User.
Local time
Today, 12:37
Joined
Jul 11, 2000
Messages
13
I haven´t found any easy way to use a report to print the record that is shown in a form instead of printing all the records at one time. If I have a table containing addresses and want to print one of them then which way is the best. The best would be if there was a button in the form that would print the address. I want the address to fill a whole A4 page horisontally. It´s easy to print all the addresses in a report but not to print just one of them.

Thank you
 
If you add a button to your form to print the current record, the wizard will walk you through the process. One of its questions asks if you want to print a specific record. Answer yes.
 
I have the same problem. The answer given prints a copy of the form with the current record. How can the current record be printed using a report?
 
This has been answered numerous times in this forum. The following code, when placed behind the On Click of your Print command button will print out the current record shown in your report. Replace the names of the form, report and command button as necessary.
Private Sub MyCommandButton_Click()
On Error GoTo MyCommandButton_Click_Err

DoCmd.Save acForm, "MyFormName"
DoCmd.OpenReport "MyReportName", acNormal, "", "[IDField]=[Forms]![MyFormName]![IDField]"
DoCmd.Close acForm, "MyFormName"


PrintMyReportName_Click_Exit:
Exit Sub

PrintMyReportName_Click_Err:
MsgBox Error$
Resume PrintMyReportName_Click_Exit

End Sub

Good luck
 

Users who are viewing this thread

Back
Top Bottom