***NEWBIE*** Record Count

  • Thread starter Thread starter guins.fan
  • Start date Start date
G

guins.fan

I am building a database to keep track of personnel. I need to be able
to count the number of days that a person has been on a project (ie.
0-30 days; 31-60 days, 61-90 days, <90). I have a Started Project Date
in my table and can't seem to get the Function/coding right to pull
these dates. I need to have each category in a report field
(0-30-----# of Projects, etc...) I was trying to avoid using a query,
if possible. I can visualize the code, but don't know how to achieve
it in Access 2003. I believe the code would be an IF statement,
something like:

IF ([ProjDate]<= Date()-30, [Count],0)

But, I'm not as savvy on the coding as I need to be.

Any help would be appreciated. Thanks


~CRASH~
 
It isn't clear whether you report would include only these counts or if you
want to display details and then show the counts in a group or report header
or footer.

Also, are these date ranges always, forever never going to change or will
someone want to ever group them in different ranges?

"trying to avoid using a query"...why?

Open any module and click F1 for Help. Search for the Partition() function
which might be exactly what you need without any code.
 
First, the Date will always be the same it doesn't change. So, in the
report i need to just have the Number of records that are between 0-30,
between 31-60, etc... I only need a total number in the report, for
example:

0-30 -- 10
31-60 -- 5

I suppose I could use a query, but the report is Record Source is based
on a different Table, because the propondence of the information comes
from one table. In fact, the total number I'm trying to figure out is
the only fields that come from a different table.

~CRASH~
 
Did you look up the Partition() function in Help or choose to ignore the
advice or didn't you understand the function?

Use a totals query.
 
I did look up the Partition Function, but i guess i didn't understand
it. It didn't seem to be what i was looking for, but I'll look at it
again.
 
You can use an expression in your report's record source query like:
DateBucket: Partition(Date()-ProjDate, 0, 90, 30)
 
Back
Top