Access

  • Thread starter Thread starter A
  • Start date Start date
A

A

I am working on a access database which has dates, month and year for various
entries.

I am trying to get totals for a month (e.g. May). My month is a text entry
and I can'r get to sum it.

Eg. I have 100 records for May and I want the total for May, but May is a
text entry.

Can you help?

Thanks
 
I am working on a access database which has dates, month and year for various
entries.

I am trying to get totals for a month (e.g. May). My month is a text entry
and I can'r get to sum it.

Eg. I have 100 records for May and I want the total for May, but May is a
text entry.

Can you help?

Thanks  

You should convert the strings to a date. Some variation of this
ought to work:

CDate([MyMonth] & " 1, " & [MyYear])

MyMonth and MyYear are text fields.

Then you can use a standard summary query or a report to do what you
want... group by Year and then Month and you should be able to do
totals very easily.
 
It would be wiser to work with a date field and then run a query with a
clause like
"...WHERE Month(MyDateField) = " & MyMonth
where MyMonth is a number from 1 - 12 representing the month of the year you
want to totalize
Cesar

I am working on a access database which has dates, month and year for various
entries.

I am trying to get totals for a month (e.g. May). My month is a text entry
and I can'r get to sum it.

Eg. I have 100 records for May and I want the total for May, but May is a
text entry.

Can you help?

Thanks

You should convert the strings to a date. Some variation of this
ought to work:

CDate([MyMonth] & " 1, " & [MyYear])

MyMonth and MyYear are text fields.

Then you can use a standard summary query or a report to do what you
want... group by Year and then Month and you should be able to do
totals very easily.
 
Back
Top