auto process rqd 2 produce report based on individual record

A

Annie1904

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?
 
J

John Vinson

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]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top