Print Current Record

G

Guest

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] & "'"
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top