Print current record to report

J

Junaid

I want to print the current record from a form through a report. I have made
a reprot and also made a button to print the report, but I dont know how to
do the coding behind the button to make it print the current record on the
form. I would really appreciate if someone could help me out. Thanks in
advance
 
A

Al Camp

Juniad,
Use a query as the RowSource for your report, based on the same table as
your form.
Your form should have a Key, unique value field for each record... like a
CustomerID.
In the query behind your report, in the example CustomerID field, use
this criteria... (use your own object names)
=Forms!frmYourFormName!CustomerID
Now, when the report runs, it will only return the record you are
currently viewing on the form.
 
Top