Access 2007 - Reports

D

Dawn

I need to print a report of a form with a subform. I will need to print each
record separately. So far, I have been unsuccessful. Can somebody please
advise?

Dawn
 
A

Albert D. Kallal

I need to print a report of a form with a subform. I will need to print
each
record separately. So far, I have been unsuccessful. Can somebody please
advise?

Dawn

the way to do this is to build a report (with a sub-report) that mimics the
structure of your form + sub-form.

Get this report working and laid out the way you want.

Then, you can place a button on your form that restricts the report to the
CURRENT record you are viewing.

the code behind a button would look like:

me.Refresh
docmd.OpenReport "name of your report",acviewPreview,,"id = " & me!id

in the above "id" is the primary key, replace "id" with your name of your
key if it is different then ID
 
D

Dawn

Albert,
Thank you for your help. I was able to create the report, and it runs fine.
However, when I put a button on my form to run the report, only part of my
report is there... it is odd, I get an error message "You tried to lock table
'while opening it, but the table cannot be locked because it is currently in
use. Wait a moment, and then try the operation again." I did not have the
table or anything open.

Then, when I do finally get to the report after clicking OK several times,
only one of my subreports shows up on it. Do you know why this is?

Regards,
Dawn
 
D

Dawn

Albert,
If you will forgive that I am writing you another message, perhaps you can
help me - it appears that if I put any type of command button on my form at
all (even just the search button) I am getting that error.

Do you know what could be the cause? I am growing quite frustrated.

Regards,
Dawn
 
D

Dawn

Albert,
I finally got my report to work properly. I have had the weirdest week with
Access 2007 - it was not just me... I actually had a witness to what it was
doing. One day it wouldn't work, but I kept trying, deleting forms and
reports, recreating them, and eventually they work.

Thank you so much for your help.

Regards,
Dawn
 

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