Grouping By Quarter

O

Oscar

I have a table that corresponds week ending dates with periods and
quarters tblPeriodDates. We do not use the dates in access because we
determine our own boundries for quarters (ie some week ending dates may
fall in a different quarter than the majority of the week so we want it
grouped in the previous quarter).
Anyway, I have a report I would like to calculate on a quarterly basis
and whenever I calculate it I would like it to ask me what quarter I
would like to see the data for. We have our tblPeriodDates formatted
so quarter 2 of 2006 would look like 2-06. So if I wanted to see
quarter 2 of 2006's results I would type in 2-06. However, since this
report is generated by many different queries and reports it asks me
what quarter about seven times and I have to type it in seven times.
Is there a way I can create a form or something that will send the 2-06
to all my queries so I only have to tell it once?
Thanks!
 
M

Mac

Dear Oscar,

Probably the easiest option would be to create a form with a command
button the runs your form and a box that allows you to enter the
quarter you're after in the format you require. Having done this
reference the text box(es) on the form to the appropriate parameters in
your query, so if you called the txt box that has the quarter in it
QuarterTxt, then in the queries that need that data, you chabge the
parameter to [Forms]![MyForm]![QuarterTxt]. I've done this for date
ranged reports that I use, including ones that have multiple query
sources and subreports that require that information. As long as you
make sure all the relevant queries reference the form it should run
with you only having to put the value in once. You can also possibly
add something to the command box text that will hide the form for you
while running the report. Hope this helps.

Regards

Mac
 
M

Mac

Dear Oscar,

Probably the easiest option would be to create a form with a command
button that runs your report and a text box that allows you to enter
the quarter you're after in the format you require. Having done this
reference the text box(es) on the form to the appropriate parameters in
your query, so if you called the text box that has the quarter in it
QuarterTxt, then in the queries that need that data, you change the
parameter to [Forms]![MyForm]![QuarterTxt]. I've done this for date
ranged reports that I use, including ones that have multiple query
sources and subreports that require that information. As long as you
make sure all the relevant queries reference the form it should run
with you only having to put the value in once. You can also possibly
add something to the command box code that will hide the form for you
while running the report. Hope this helps.

Regards

Mac
 

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