reports over date ranges

Toolpusher

Registered User.
Local time
Today, 00:58
Joined
May 29, 2007
Messages
53
Hi

I have made a DB that reports safety observations from my company employee's. I have a report that lists the number of reports, the numbers of the various actions positive and negative that caused these reports to be created. I have done this by creating a number of queries that give me a count of these and inserting them into the report as a sub report. I have now managed to create a report on these albeit it displays the report over the whole DB. I would now like to be able to report over different time scales, weekly,monthly quarterly and yearly. Thought there would be an easy way of doing this hopefully using a macro but cant get there. Any help appreciated?

regards

TP
 
I tend to set my date criteria on the fly either vie paramaters or references to controls on forms.

e.g. Between [Enter start date] and [Enter end date

Using the above in the criteria will prompt the user to enter the start and end dates each time the query is run. This has the advantage of a simgle query / report being able to show any time period of any length.
 
I prefer the Form approach as it is easier to transfer the info to the report header to illustrate the criteria.


Brian
 
If I have very customisable queries (i.e. at least 5 fields which I allow the user to filter on) then I'll create a search form for the user.

However if it's a simpler database where the only criteria ever used on that report / query is the dates I'd likely not bother with a form.



Here's one of my search forms, although it's an old screen-print and it has more criteria now. I also use a set of 3 cascading comboboxes to allow the user to select the report that want to apply the criteria to:

http://www.access-programmers.co.uk/forums/attachment.php?attachmentid=35733&d=1297174868
 
For the sake of validation, I would always use a form like Brian does.

If I don't have end users then I won't bother.
 
Assuming the paramaters are set as Date/Time the potential problems are limited, but I admit that forms offer additional checks like ensuring the end date is greater than the start date, etc.

Custom coding in VBA offers a much greater degree of control than using the Access features.



re: transferring dates to report header, etc - that's easily solved by adding 2 fields with the paramaters (e.g. StDt: [Enter start date] & EdDt: [Enter end date]) and using these field names in the report header.
 

Users who are viewing this thread

Back
Top Bottom