report based on months

knzass

Registered User.
Local time
Today, 03:51
Joined
Oct 17, 2001
Messages
10
ive succeded in creating a report which list downs all te records based between two specific dates ,
what i want to do now is to generate a report according to months...
for instance how many records are there in the month of Jan, and also how many records were there from the month of January to May,

what i have in mind is having two combo boxes, combobox1 for the starting month and combobox2 for the ending month...
 
I am a little bit confused at your mention of comboboxes, since as far as I know, although I may be wrong, reports are not "interactive", so a combobox would be of little use. You could instead base your report on a query or form where users would input the months.
 
OK, You can have two comboboxes, one with the beginning month and one with the ending month.

What you need to do is to create a new field in your query that will pull out just the month from the date in your table. Then you use between in the criteria for this field.
 
i have a field named "Date" which uses the short date format "mm/dd/yy" i know how to create a
- BETWEEN "" AND "" - for dates but im not sure about months

- regarding ur suggestion, how can i extract the month from the short date format:?
 
Use the DatePart function. Make a new field in your query and on the field line type something like

Month: DatePart("m",[nameofyourdatefield])

You can also look up DatePart in Access help...it's a fairly clear explanation.

HTH

[This message has been edited by LQ (edited 10-31-2001).]
 
I just did this yesterday for the exact same problem. Here's what it took:
In Design View>Sorting and Grouping, for YourDateField (Ascending, probably) choose Group Header Yes, Group on Month. Then under the detail section you want to delete the box for YourDateField. This will keep your report from including detailed entries for each row. Then in the Group Header for YourDateField change the format to mmmm yyyy. You can do this instead of DatePart(). Finally I included a new text field and encoded =Count([YourReportField]) as the Record Source. This should summarize, for that month, the records meeting whatever criteria you have set.

Hope that helps.
David
 
Last edited:

Users who are viewing this thread

Back
Top Bottom