Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

print only 1 record from the subform

Status
Not open for further replies.

franksirvent

Programmer
Mar 8, 2002
358
GB
Hi there
I have 1 form and subform.
The subform can have many records, all linked to the main form.
Only one subform record can be viewed at a time (I can view all the records on the subform by pressing NEXT PREVIOUS buttons)

What I need is to print the MAINFORM and the CURRENT SUBFORM record only.

I already have a report which prints the MAINFORM data plus ALL the subform data.

I want to use the same report to print just the CURRENT SUBFORM DATA (as well as the Mainform data)

I know how to get the Subform record ID number however I don´t know how to "tell" the report to only print the current subform record.

Your help is appreciated

 
Make the source for the report a query that combines the two tables (main and sub) and matches the current main record id and also matches the subform record ID.

You might want to create a new version of your report that doesn't use a subreport (if the current one does) and uses the query mentioned above as its record source.
 
Thanks BSMAN

From what you told me, I worked out a way...and it works!

Thanks for sending me on the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top