Printing a form

D

Dorian

My form has a print button which does DoCmd.PrintOut acSelection command.
The problem is that my form has several subforms.
When a subform contains no data, all I get printed is an empty box. I'd like
to get the headings and the one empty line as is displayed on the form - but
this does not print. Is there any way to make the print show the same as the
screen?
This is Access 2003.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
D

Dorian

That's what I am doing, did you read my entire post?
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
G

golfinray

I am looking at one right now with several subforms and it prints fine when
one of the subforms has no data. It prints the screen. You don't have
something else set funny do you?
 
S

Steve

Forms are for adding, editing and deleting data. Reports are for printing
out data. Why don't you create a report/subreport with an appropriate
recordsource to print out your data?

Steve
(e-mail address removed)
 
D

Dorian

because DoCmd.Printout achieves 99% of what I want in a single statement with
no duplication of effort. If I create a report, it will take me a couple of
hours and I'll be left with having to implement changes in two places.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
G

Gina Whipp

Dorian,

It's that last 1% that is the reason you should use a report. I am also not
sure why you would have to implement changes once the report has been
created.

The problem with using the form is exactly what your are experiencing...
When there is no data there is nothing to print. In a report you could use
subforms and have what you want to print behind the subreport (setting the
subreport to shrink) and then your empty line would show when there is no
data. As I don't use forms for printing I am not sure how to accomplish
that task with forms.

--
Gina Whipp
2010 Microsoft MVP (Access)

"I feel I have been denied critical, need to know, information!" - Tremors
II

http://www.regina-whipp.com/index_files/TipList.htm

because DoCmd.Printout achieves 99% of what I want in a single statement
with
no duplication of effort. If I create a report, it will take me a couple of
hours and I'll be left with having to implement changes in two places.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
D

De Jager

Dorian said:
My form has a print button which does DoCmd.PrintOut acSelection command.
The problem is that my form has several subforms.
When a subform contains no data, all I get printed is an empty box. I'd
like
to get the headings and the one empty line as is displayed on the form -
but
this does not print. Is there any way to make the print show the same as
the
screen?
This is Access 2003.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and
they
eat for a lifetime".
 

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