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

  • Thread starter Thread starter Danny
  • Start date Start date
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.
 
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.
 
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
 
Back
Top