Quarterly & half yearly report

G

Guest

I have a query "YlyQA" which sorts all the data of the current a year (The
year is supplied by Input Box by user). It works normal.

I want to make a another Query based on the above query for Quarterly report
and one more query for Half yearly report. I mean 2 seprate query.

Please advise me a method by which I can make both the query.

Regards.

Irshad.
 
V

Vincent Johns

Irshad said:
I have a query "YlyQA" which sorts all the data of the current a year (The
year is supplied by Input Box by user). It works normal.

I want to make a another Query based on the above query for Quarterly report
and one more query for Half yearly report. I mean 2 seprate query.

Please advise me a method by which I can make both the query.

Regards.

Irshad.

I assume that at least one field in [YlyQA] contains the date on which
you are filtering the report. I'll refer to it as [TransactionDate].

You'll need a means for the user to specify which quarter (or which
half) is to be used. That could be either via specifying a start date
or the number of the quarter.

If the user chooses a date, for example [StartOfQuarter], you can
compute the end of the quarter from that using a function such as

[TransactionDate] >= [StartOfQuarter]
and [TransactionDate] < DateAdd("q", 1, [StartOfQuarter])

This version identifies the beginning of the next quarter, but you may
prefer to choose whatever date is 3 months later than that specified,
for example via (DateAdd("m", 3, [StartOfQuarter])).

If the user chooses a quarter number, you can either compute, or look up
in a Table that you define, the date of the beginning of that quarter.

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 

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