Print a specific subform record?

C

Charles Harmon

I have a main form with an included subform that has
several records. One record and its data shows on the
subform. Navigation buttons can show each detail record in
the subform. The print button on the form works fine when
there is a single subform record.

If there are multiple records on the form, it prints the
Form Header, then all the records in the subform then, the
Form Footer, spanning several pages. The subform detail
records are not separated on the separate pages and there
is only one Form Header and Footer for the whole group of
pages
..
Using DoCmd.PrintOut acPages, 1, 1 always prints out the
first record ( and part of the second) no matter which
record is showing on the screen.

Using: DoCmd.DoMenuItem acFormBar, acEditMenu, 8, ,
acMenuVer70
DoCmd.PrintOut acSelection
This prints as described in par. 2 above.

I want the user to be able to be able to print the main
form with a single subform record on each page. If there
is more than one record in the subform, each record should
print out on a separate page (along with the Form Header
and Footer).

I am using Access 2000.

Any help doing this will be appreciated. Thanks.
 
E

Emilia Maxim

I have a main form with an included subform that has
several records. One record and its data shows on the
subform. Navigation buttons can show each detail record in
the subform. The print button on the form works fine when
there is a single subform record.

If there are multiple records on the form, it prints the
Form Header, then all the records in the subform then, the
Form Footer, spanning several pages. The subform detail
records are not separated on the separate pages and there
is only one Form Header and Footer for the whole group of
pages
I want the user to be able to be able to print the main
form with a single subform record on each page. If there
is more than one record in the subform, each record should
print out on a separate page (along with the Form Header
and Footer).

Charles,

don't print the form, you'll always get awkward results. Create a
report with the layout you need (you'll need a subreport too), and
print the report. You can pass the ID of the main form record as a
parameter in the DoCmd.OpenReport statement.

Best regards
Emilia

Emilia Maxim
PC-SoftwareService, Stuttgart
http://www.maxim-software-service.de
 
C

Charles

Thanks for the suggestion Emilia.

I created a report, with a subreport as you suggested.

So far I still have the same problem when multiple records
are in the subreport, they are not appearing on separate
pages with Header and Footer. They are showing as multiple
records between a single header and footer over multiple
pages.

I will continue working on the problem and see if I can
get the individual records in the subreport to each appear
on a separate page with main report header and footer.

Charles
 

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