How to print a record from a form with its subform(subform on a tab control)

D

Danny

Hi

I been having problems printing out a form for a specific
record. The subform that is on the tab control can not be
printed. The way I coded to print the form was by :

DoCmd.OpenForm "frm_Main" ', , , WhereCondition:="'" & SSN
& "'"
DoCmd.PrintOut acPages, RecNum, RecNum

Where RecNum is the record number. The record number is
found right before these lines.
Any help would be appreciated.
 
J

John Vinson

Hi

I been having problems printing out a form for a specific
record. The subform that is on the tab control can not be
printed. The way I coded to print the form was by :

DoCmd.OpenForm "frm_Main" ', , , WhereCondition:="'" & SSN
& "'"
DoCmd.PrintOut acPages, RecNum, RecNum

Where RecNum is the record number. The record number is
found right before these lines.
Any help would be appreciated.

I'd suggest creating a Report with a Subreport, and printing *that*.
Forms are optimized for onscreen use, and aren't ideal for printing.
You can put a command button on the Form to print the Report, just
like your DoCmd.OpenForm - just use OpenReport instead.
 
T

Tim Ferguson

I been having problems printing out a form for a specific
record. The subform that is on the tab control can not be
printed.

PrintForm is a lousy method of getting anything onto paper. Use a report
instead, and set the WHERE parameter to get just the record you want.


HTH

Tim F
 

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

Top