Counting

W

williamr

I have a table with a field named 'memodate'. I'm trying to count them by
year so I can say we have 100 that are 1 year old, 350 that are 2 years old,
etc.. My source code is:
=DCount("[memodate]","tbl-bond","(datediff,y,now,memodate)") but it does not
work. Can anyone offer help??

Thanks
William
 
M

Marshall Barton

williamr said:
I have a table with a field named 'memodate'. I'm trying to count them by
year so I can say we have 100 that are 1 year old, 350 that are 2 years old,
etc.. My source code is:
=DCount("[memodate]","tbl-bond","(datediff,y,now,memodate)") but it does not
work.


You are not using DateDiff correctly.

. . .,"DateDiff("yyyy", memodate, Date())")

I don't see how using DCount will do what you want, but you
didn't explain where you are using it, so I can't say that
it might or offer any alternative they may be better in a
larger context.
 

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