Printing Reports

D

Dan Sweetwood

I have created a patient database with many forms each
with a command button to print a specific report. The
challenge for me is print the same record showing in the
form that the user is currently in. I use macros
(OpenReport or PrintOut)pointing to reports based on
parameter queries for each report that causes the user to
enter the RecordID before opening or printing that report
thus printing only the specific patient information versus
all records. I would prefer that the user does not have to
enter the RecordID but once clicking on the command button
the record they are currently in prints. What is the best
method to accomplish this? Thanks for your help.
 
C

Cheryl Fischer

Dan,

A little VBA in the Click event of your command button will do the trick:

DoCmd.OpenReport "MyReport", , , "PatientID = " & Me!PatientID

hth,
 
E

Ed

Hi I use macros also.
This works good for me.
Put this kind of statement in the "where condition" area in the open report
macro you are using.

[RecordID]=[Forms]![Your form name]![RecordID]
 
G

Guest

Ed,

Thank you very much. I have so much to learn!

Dan
-----Original Message-----
Hi I use macros also.
This works good for me.
Put this kind of statement in the "where condition" area in the open report
macro you are using.

[RecordID]=[Forms]![Your form name]![RecordID]

I have created a patient database with many forms each
with a command button to print a specific report. The
challenge for me is print the same record showing in the
form that the user is currently in. I use macros
(OpenReport or PrintOut)pointing to reports based on
parameter queries for each report that causes the user to
enter the RecordID before opening or printing that report
thus printing only the specific patient information versus
all records. I would prefer that the user does not have to
enter the RecordID but once clicking on the command button
the record they are currently in prints. What is the best
method to accomplish this? Thanks for your help.


.
 

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