Print Only Current Record

  • Thread starter Thread starter Phil M.
  • Start date Start date
P

Phil M.

I have a form and subform. I have a report created that shows the data from
these two forms.

I want to make a command button that will bring up the report preview, but
ONLY the current record.

I have found resources on the Internet, but they come up with an error
message. Does anyone know a simple way to accomplish this?

Thanks
Phil
 
Hi,

You should create the report to use the same recordsource as the form.
Also, it should have a subreport to contains the same data as subform , and
linked with main report.

Then, from your form, call the report with the following code

docmd.OpenReport "", acViewPreview, , "FieldID=" & me!FieldID

where FieldID is the ID field of your table.

HTH,
Bogdan
_______________________________
Freelance programmer
 
Phil,

The simple way is to create a query that has the record
field=the record field in the open form. Use this query
to support the report. Simple and quick..
 
Back
Top