Part of the form is not printed. Why ?


P

pschrader

Hi !

I'm using MS Access 2003 and Windows XP Professional.

I have a form with a print button on it.
Pushing the button is to print the current record as it is being displayed
in the form.
And largely it does so.
However, there is also a tab control on the form.
On the tab control there are subforms that display further data.
These data are not printed.

What's going wrong ?

Your kind help will be greatly appreciated.

Peter
 
Ad

Advertisements

A

Albert D. Kallal

What's going wrong ?
I'm going to let you in on a little secret that will help prevent from
winding up in a room with padded walls and people in funny looking white
coats.

Forms = something that is used to enter data into the database.

Reports = something that you used for printing of data.

In a nutshell the solution to your problems here is to use a report to print
you data.

To print the CURRENT record, the code is:

if me.Dirty = True then
me.dirty = false ' force disk write of data
end if

docmd.OpenReport "nameOfReport",,,"id = " & me!id

the above little condition forces a disk right of the data in the form in
case it's been modified before you actually try and launch a report which of
course we'll pull the data from the table, and not the actual form your
viewing.

the above also assumes that you have a primary key ID in your form of "id",
which is the default for MS access.

the advantage of using a report means that you can put in things like
headings footings page numbers, what have funny buttons and weird controls
getting printed, simply lay out your report the way you want with the dated
you desire.

if you have any sub forms in your actual form, then follow the same logical
modeled in your report, but simply build what is called a sub report.

For the most part you'll find that sub forms in a form print extremely
poorly. If you use a report and use sub reports, then you'll find that they
expand and print the data in a correct and reasonable fashion.

At the end of the day simply adopt what all developers here have come to
realize, and that is to simply recommend you use reports for printing, and
forms for data entry...
 

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

Similar Threads


Top