auto process rqd 2 produce report based on individual record

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

Guest

How do I create a process for producing a report based on an individual
record in my database. I need to produce a report each time I add or amend a
record in my database, which is often, so I need an automated process rather
than creating a new report each time. I want to select a record, then using
a macro or some other method to produce and print a report based on that
record alone. Can anyone help?
 
How do I create a process for producing a report based on an individual
record in my database. I need to produce a report each time I add or amend a
record in my database, which is often, so I need an automated process rather
than creating a new report each time. I want to select a record, then using
a macro or some other method to produce and print a report based on that
record alone. Can anyone help?

If you're adding the record on a Form (as I would strongly recommend),
you can easily launch a Report from the Form's AfterUpdate event.

Base the Report on a Query referencing the unique record ID field's
bound control on the form: a criterion

=[Forms]![YourFormName]![ControlName]

on the record ID field will work. Then put code in the Form's
AfterUpdate event like:

Private Sub Form_AfterUpdate()
DoCmd.OpenReport "YourReportName"
End Sub

The OpenReport method gives you the option of opening in preview or
printing immediately, see the online help.

John W. Vinson[MVP]
 
Back
Top