Print Current Record

K

Kat

I would like to print a report for the current record you are viewing from a
form. I have a combox that you enter the record number. Then the form will
open with all the information for that recod number. I want to print a
report for just that record number how do I do it?
 
F

fredg

I would like to print a report for the current record you are viewing from a
form. I have a combox that you enter the record number. Then the form will
open with all the information for that recod number. I want to print a
report for just that record number how do I do it?

Code a command button Click event on that form:

If the RecordID is a Number datatype:
DoCmd.OpenReport "ReportName", acViewPreview, , "[RecordID] = " &
Me.[RecordID]

If the RecordID is a Text datatype:
DoCmd.OpenReport "ReportName", acViewPreview, , "[RecordID] = '" &
Me.[RecordID] & "'"
 
R

Roger

Kat Place a command button on the form, set the properties on click, event
procedure.
Private Sub Command78_Click()
DoCmd.RunCommand acCmdPrint
End Sub
That will print the form.
Roger
 
Top