printing current record

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

Guest

I would like to be able to pull up a current record in a form and be able to
print that record by switching to a record.
I end up printing every record in my database. How do get only the current
record to print?
 
goodie said:
I would like to be able to pull up a current record in a form and be able to
print that record by switching to a record.
I end up printing every record in my database. How do get only the current
record to print?


Use a command button on the form to open the report. The
button wizard will generate the basic outline of the code so
you can modify it a little with:

. . .
stCriteria = "[keyfield] = " & Me.txtKey
DoCmd.OpenReport stDoc, , , stCriteria

where keyfield is the record's primary key field and txtKey
is the form's text box bound to the key field.
 
Back
Top