Report Generation

  • Thread starter Thread starter John C.
  • Start date Start date
J

John C.

I have a application that allows the user to record staus
of various equipment on a form.

I also have setup a report for the various fields to allow
printing.

How do I get the information for the selected record
displayed on the form, to display in the report?

Thankyou in advance.
 
John,

I think there are two commonly used approaches to this. One is to refer
in the criteria of the query that the report is based on, to the current
record on the form, most likely via the primary key field in your data,
so the syntax of the query criteria might look something like this...
[Forms]![NameOfYourForm]![YourID]
The other is to use the Where Condition argument of the macro/procedure
that you use to print the report. Assuming you are using VBA from a
button or some such on the form, the code might look something like this...
DoCmd.OpenReport "YourReport", , , "[YourID]=" & Me.YourID
 

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

Back
Top