Printing only current record...

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a report I want to use to print only the current record before me on
screen. How do I write a query to select just the on-screen (current) record
to send to the report so I can click a button that says "print this record?"
 
The following code behind a button will print the current record.


me.refresh
docmd.OpenReport "yourReprotName",acViewPreview,,"id = " & me!id

The first line of code forces a disk write (since the report works off the
table...so to see any changes you made, you must first force the current
record to disk.

The next line launches the report. When you get the above working, you can
remove the acViewPreview and the report will print without user
intervention.
 
Back
Top