print a single record in vba

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

Guest

I have tried to print a single record using vba but all it does is to print
all records pertaining to the database open at that time via a report.
There does not appear to be a single command that will print a single
record. I have tried using printout etc to no avail.
 
Hi,
you have to filter your report first - once you have primary key field - run
docmd.openreport with where condition "MyID=" & Forms!MyForm!MyID
 
Back
Top