By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,687 Members | 2,065 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,687 IT Pros & Developers. It's quick & easy.

Passing query "Between" date values into Report heading

P: n/a
Simple problem, but I've checked the newsgroups and couldn't find an
answer.
On the main swithboard is a command button to open a report. The
report I built is based off a query, and the query is now restricted
by the simple "Between [Enter Beginning Date:] And [Enter Ending
Date:]". What I want to do is pass the values of the two parameters
into some textboxes in the heading of the report (so if 12/1/03 and
12/31/03 are the parameters, I can display the entered dates in the
report). Feel free to include solutions with Getz\Litwin's
TaggedValues classes.
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
The easiest way may be to use a pop-up form in the report's open event to
query for these values. The query and the report could then refer to the
values on the form. Open the form with the acDialog window mode argument to
halt the code on the report. The code will resume when you hide the form.
You would then close the form when you close the report.

--
Wayne Morgan
Microsoft Access MVP
"Greg Iocco" <gi****@kub.org> wrote in message
news:42*************************@posting.google.co m...
Simple problem, but I've checked the newsgroups and couldn't find an
answer.
On the main swithboard is a command button to open a report. The
report I built is based off a query, and the query is now restricted
by the simple "Between [Enter Beginning Date:] And [Enter Ending
Date:]". What I want to do is pass the values of the two parameters
into some textboxes in the heading of the report (so if 12/1/03 and
12/31/03 are the parameters, I can display the entered dates in the
report). Feel free to include solutions with Getz\Litwin's
TaggedValues classes.

Nov 12 '05 #2

P: n/a
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

You can put the query's pop-up parameters in a report's Text Box's
ControlSource property like this:

ControlSource: =Format([Enter Beginning Date:], "d mmm yyyy")

When the report runs the Text Box will display a date string like
this: "20 Jan 2004"

HTH,

MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQA2E7IechKqOuFEgEQKW8ACdHFSvZ/nWY2n9acw2Qp4uXv6t+QgAnjhp
1M6LFMJe05yFSwREo3NRSGsN
=nLNy
-----END PGP SIGNATURE-----
Greg Iocco wrote:
Simple problem, but I've checked the newsgroups and couldn't find an
answer.
On the main swithboard is a command button to open a report. The
report I built is based off a query, and the query is now restricted
by the simple "Between [Enter Beginning Date:] And [Enter Ending
Date:]". What I want to do is pass the values of the two parameters
into some textboxes in the heading of the report (so if 12/1/03 and
12/31/03 are the parameters, I can display the entered dates in the
report). Feel free to include solutions with Getz\Litwin's
TaggedValues classes.


Nov 12 '05 #3

P: n/a
How about having the query read directly from the text boxes on the
form and take the pop-ups out of the query? the user has to type the
values into the form instead of into pop-ups.
for example let's say you name them txtFromDate and txtToDate and your
switchboard form is called Switchboard.
your criteria might look like: Between #forms!Switchboard!txtFromDate#
and #forms!Switchboard!txtToDate#
HTH
Pachydermitis

your criteria m
gi****@kub.org (Greg Iocco) wrote in message news:<42*************************@posting.google.c om>...
Simple problem, but I've checked the newsgroups and couldn't find an
answer.
On the main swithboard is a command button to open a report. The
report I built is based off a query, and the query is now restricted
by the simple "Between [Enter Beginning Date:] And [Enter Ending
Date:]". What I want to do is pass the values of the two parameters
into some textboxes in the heading of the report (so if 12/1/03 and
12/31/03 are the parameters, I can display the entered dates in the
report). Feel free to include solutions with Getz\Litwin's
TaggedValues classes.

Nov 12 '05 #4

P: n/a
>
You can put the query's pop-up parameters in a report's Text Box's
ControlSource property like this:

ControlSource: =Format([Enter Beginning Date:], "d mmm yyyy")

That's what I was looking for. Thank you everyone for the help.
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.