Printing a single page only from a button?

  • Thread starter Thread starter Mark
  • Start date Start date
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!
 
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
 
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
 
Back
Top