Passing data to a report from an input box

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have reports created where the filter is created based on criteria chosen
from the calling report. Additionally, before the report opens, the user
enters a beginning and ending date via an input box, and those dates are
stored in variables. I have specified those variables in the arguments of
the docmd.open report, and it works as planned, picks up the correct date.
However, once the report is open, I want the beginning and ending dates to
appear in text boxes on the report, specifically in the page header -- but
can't seem to do that. Once the docmd open statement is run and the dates
are used to filter the info that appears, the variables empty out, even
though the calling report has not closed yet (so I would have thought they'd
still be in scope).

Is there a way of doing this that I'm just not seeing? Or do I need to make
a whole form for thee inputs?

Thanks.
 
Do you actually have a report call another report? Can you provide your
method/code for opening the report?
You might want to play with a text box with a control source of:
=[Filter]
 
Oops, no, I mistyped. I have a FORM that calls the report, not a report
calling another report. The form calls many reports, including several that
use different date fields (representing different dates), so I was hesitant
to add more date fields that would be applicable only to this group of
reports, lest it confuse the user.

Duane Hookom said:
Do you actually have a report call another report? Can you provide your
method/code for opening the report?
You might want to play with a text box with a control source of:
=[Filter]

--
Duane Hookom
MS Access MVP
--

KarenH said:
I have reports created where the filter is created based on criteria chosen
from the calling report. Additionally, before the report opens, the user
enters a beginning and ending date via an input box, and those dates are
stored in variables. I have specified those variables in the arguments
of
the docmd.open report, and it works as planned, picks up the correct date.
However, once the report is open, I want the beginning and ending dates to
appear in text boxes on the report, specifically in the page header -- but
can't seem to do that. Once the docmd open statement is run and the dates
are used to filter the info that appears, the variables empty out, even
though the calling report has not closed yet (so I would have thought
they'd
still be in scope).

Is there a way of doing this that I'm just not seeing? Or do I need to
make
a whole form for thee inputs?

Thanks.
 
Do you still have a problem? Did you read beyond the first sentence of my
reply?

--
Duane Hookom
MS Access MVP
--

KarenH said:
Oops, no, I mistyped. I have a FORM that calls the report, not a report
calling another report. The form calls many reports, including several
that
use different date fields (representing different dates), so I was
hesitant
to add more date fields that would be applicable only to this group of
reports, lest it confuse the user.

Duane Hookom said:
Do you actually have a report call another report? Can you provide your
method/code for opening the report?
You might want to play with a text box with a control source of:
=[Filter]

--
Duane Hookom
MS Access MVP
--

KarenH said:
I have reports created where the filter is created based on criteria
chosen
from the calling report. Additionally, before the report opens, the
user
enters a beginning and ending date via an input box, and those dates
are
stored in variables. I have specified those variables in the
arguments
of
the docmd.open report, and it works as planned, picks up the correct
date.
However, once the report is open, I want the beginning and ending dates
to
appear in text boxes on the report, specifically in the page header --
but
can't seem to do that. Once the docmd open statement is run and the
dates
are used to filter the info that appears, the variables empty out, even
though the calling report has not closed yet (so I would have thought
they'd
still be in scope).

Is there a way of doing this that I'm just not seeing? Or do I need to
make
a whole form for thee inputs?

Thanks.
 
Back
Top