Report with multiple queries asks too many questions

  • Thread starter Thread starter tim
  • Start date Start date
T

tim

Hello all:

I have a report with 4 graphs. Each graph pulls data from a separate
query. Each query has a criteria written to ask the user to enter a
start and end date.

The graphs come out perfect, but it requires, obviously, the user to
enter the start and end date 4 times each (8 total entries) before
getting the results.

The way that the report is run, the queries will all use the same start
and end date (e.g. if the report is run for the month of October, the 4
start dates will be 10/1/2005 and the 4 end dates will be 10/30/2005).
The dates will obviously change as time goes on, but the 4 queries will
always use dates equal to each other. Does this make sense?

I need to find a way to only have to enter the start and end date once.
I don't know if this is something that needs to be in a table, or
something that needs to be coded in the query or the report, etc.

By the way, I am a total noob at Access, so please try and dumb down
your directions.

Thank you in advance,
Tim
 
Tim,

There are two alternatives that I can think of:

1. I assume your queries have parameters in the form os [pmDateStart]. Have
you tried naming the parameters exactly the same in all 4 queries? i.e., use
[pmDateStart] and [pmDateEnd] in all 4 queries. Make sure you spell them
exactly the same.

2. If above does not work (sometimes access asks for the parameters again
even if they are named the same) then the other solution is to build a form
on which you'll have the user select start and end daates and then your
queries will draw the dates from that form.
 
2. If above does not work (sometimes access asks for the parameters
again
even if they are named the same) then the other solution is to build a
form
on which you'll have the user select start and end daates and then your
queries will draw the dates from that form.


This sounds like what I want. Can you give an example of how this
would work? I don't understand how you can have a query draw info from
a form.

Thanks!
Tim
 
Well in your query I assume that in one of the date criteria fields you must
have something like 'BETWEEN [Enter Start Date] AND [Enter End Date]'.

Just replace whatever is within the square brackets by the fully qualified
name of the textbox or control on your form that will contain the respective
start and end dates. That is, replace [Enter Start Date] with
Forms!frmFormName.txtStartDate. Then ion the form add a command button, and
in its Click event you can run the query that you want. That way when the
query fires up it will find whatever date you have selected on the form as
the criteria.

HTH
 
Back
Top