Printing a single page only from a button?

M

Mark

I have a realtively simple Access 97 database used by non-
technical users.

I want to add a button to a form that will print out a
report for the record they are looking at only.

I have the button working, and it launches a macro
to "OpenReport". But I have a 1000 page manual on Access
97 and can't figure out how to get it to select and print
ONLY the record I was looking at when I clicked the button?

Any suggestions?
Thanks!
 
A

AlCamp

Mark,
The record you are displaying on your form (ex. frmYourFormName) should
have a unique identifier field (ex. YourKeyField).
In the query behind your report, in the YourKeyField column, place this
criteria...
=Forms!frmYourFormName!YourKeyField
From the form, hit your print report button, and the report (being
filtered by the value on the form), will only print the one record with that
unique YourKeyField value.
hth
Al Camp
 
D

DissentChick

Hi there, I have a similar situation to this, except I need to preview and
print the record in the report that matches the current record in my form.
My report is based on a query based on two tables, Work Order Log and
Equipment. Can this be done in a macro, or does it need code? BTW, my pk is
Work Order # (this is the way it is listed in my database) In other words, I
want to preview and print the Work Order I just entered. Thank you in advance
for any help.
Aaron Regular
 

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