Passing value on to report (1 Viewer)

mg55345

Registered User.
Local time
Today, 13:07
Joined
Sep 24, 2007
Messages
12
Hi,

I am having problems with an Access form. I want to pass a value on to a report that uses 4 different queries to be generated.



As you can see in this image, the Printer icon button in the corner launches a report I created. I created this with a very simple macro:



As it is, though, one has to manually enter the "CASE ID" four times to view the report correctly. How can I pass the current CASE ID to the report so save this manual entry?

I really appreciate any help with this. I will try to answer any questions you may have. Thanks in advance for any pointers.
 

MSAccessRookie

AWF VIP
Local time
Today, 16:07
Joined
May 2, 2008
Messages
3,428
I assume that the following two things are true:
  1. The Form is Open and was active when the report started.
  2. The Case Number Field on the form contains the value that you need.
Each of your queries, can get the proper value for the Case Number by referring to Forms!YourFormName!CaseNumber where the formula requires it. Since it is already defined on the form, the query will not need to ask for it. See if this works for you.
 

mg55345

Registered User.
Local time
Today, 13:07
Joined
Sep 24, 2007
Messages
12
This works perfectly. I hadn't thought of needing to do this in the report itself. Thanks Rookie!
 

Users who are viewing this thread

Top Bottom