on report open, query date

B

BrentDA

I've looked through previous questions about this, and I can't seem to find
what I'm looking for.

The issue: When the end user opens a report I want a date parameter
drop-down list of the date ranges (see next paragraph) for the user to choose
from.

Database has date ranges that are manually keyed into a table, e.g., Jan
1-3, Jan 4-10...one date range per record/row. When the user inputs data on
a form, the user selects one of the date ranges from a drop-down list.

Thanks in advance for your help !

Brent
 
S

Stefan Hoffmann

hi Brent,
The issue: When the end user opens a report I want a date parameter
drop-down list of the date ranges (see next paragraph) for the user to choose
from.
You need to code a function which encapsulates a modal form to select
your date range. This is a bit tricky.

The easier way: open the report from a button on that form after
selecting the date range.


mfG
--> stefan <--
 
B

BrentDA

Stefan,

Thanks for your help...not really what I'm looking for.

I wonder if putting some kind of query in the 'On Open' property of the
report would work to have the date range drop-down list pop up. I'm thinking
this way, because the report for the 'current date' form might not be
immediately needed. I'm trying to eliminate the step of opening the form to
get the report if the form is not needed for input.

Any ideas for possibly setting up the previously-mentioned query is greatly
appreciated !

Thanks !

Brent
 
S

Stefan Hoffmann

hi Brent,
I wonder if putting some kind of query in the 'On Open' property of the
report would work to have the date range drop-down list pop up. I'm thinking
this way, because the report for the 'current date' form might not be
immediately needed. I'm trying to eliminate the step of opening the form to
get the report if the form is not needed for input.
Then you need the function. E.g. in this record source

SELECT *
FROM [yourTable]
WHERE IsDateInRange([yourDateField])

Coding this function is tricky, but possible...


mfG
--> stefan <--
 

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