Printing from a Form...

  • Thread starter Thread starter Clarence
  • Start date Start date
C

Clarence

I have (thanks to rick's reply to my last post) created a
form with a matching layout for my report...

Now, how do I put a button on the FORM that will print
ONLY the current record in the REPORT?

The way it's working now, all records are shown in the
report....I only want this report to show the current
record.

Thanks,
Clarence
 
I have (thanks to rick's reply to my last post) created a
form with a matching layout for my report...

Now, how do I put a button on the FORM that will print
ONLY the current record in the REPORT?

The way it's working now, all records are shown in the
report....I only want this report to show the current
record.

Thanks,
Clarence

Clarence,
Your Table should have a unique prime key field.

Code the command button Click event:
DoCmd.OpenReport "ReportName",acViewPreview, , "[RecordID] = " &
[RecordID]

The above assumes [RecordID] is the name of the Prime key field, and
that it is a Number datatype.

If [RecordID] is a Text Datatype, then use:
"RecordID] = '" & [RecordID] & "'"
 

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