Printing records in subform

S

Shalini

Hi,

I have a form "main", that has a subfrom. Main form and subform are
attached through Master and Child link fields. Also the data in
subform is being populated through the query written in the main form.
I want to print a form and the subform within that form along with the
data in that subform.

I'm calling the print command from a command button on "mainform".
For some users it is printing correct set of records with the
condition in the subform but for some users it is printing all the
records in the main form and all the records in the subform, creating
lots of pages to print instead of selected set of records based on
given condition.
Any suggestions or comments in resolving the problem would be
helpful.

Thanks,
 
J

John W. Vinson

I want to print a form and the subform within that form along with the
data in that subform.

Print a Report instead. Forms are designed for onscreen use, not for printing.
Base the Form on a Query referencing appropriate controls on the form as
criteria -

=Forms!Mainformname!Subformcontrol.Form!Textboxname

to reference a textbox on the subform.

John W. Vinson [MVP]
 
S

Shalini

Base the Form on a Query referencing appropriate controls on the form as
criteria -

=Forms!Mainformname!Subformcontrol.Form!Textboxname

to reference a textbox on the subform.

Thanks for your suggestions. referencing the appropriate controls did
help. Now the form printing is working for other users too.
 

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