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!

How to print just the record in a sub form

Status
Not open for further replies.

slammer14

IS-IT--Management
Jun 27, 2001
40
CA
I want to print just the record on a sub report. It is printing the main form then a sub form then the subform from that. How can I get it to just print a subform record without the rest of the info??

ANy suggestions???

Thanks slammer
 
I generally create reports that reflect all of the info on the form. That way if the user wants to print the current record (shown on the form) or a range of records, I just open the report with the filter property set.

You could do the same with your subform.
 
OK i see but how do I get just the form I still don't understand? Do I do a query????

Confused :S

slammer
 
Create a report containing the info you want. In your case it may just be the contents of the subform. When the user selects your print button, open the report and set the where (or filter) part of the OpenReport argument. For example, suppose the field that uniquely identifies the record in the subform is the employee ID. Your OpenReport command would look like this:

Docmd.OpenReport "rptYourReport",,,"lngEmployeeID = " & Me!subFormName.Form!lngEmpolyeeID
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top