Dcount Problem?

  • Thread starter Tyler Denmead via AccessMonster.com
  • Start date
T

Tyler Denmead via AccessMonster.com

Hi,

I would like to do a dcount using two criteria.

One criteria is located in the form named "Student Data Entry" in an
unbound text box named "Age" that calculates a student's age using this
formula: =DateDiff("yyyy",[Birthday],Date())-IIf(Format([Birthday],"mmdd")
Format(Date(),"mmdd"),1,0). [Birthday] is the field in the query "Student
Data Entry," the source for the form. Students are typically 14-18.

The second criteria is a field named "1Q" in the same form. The data can
be 1-4.

So, in a report, I'd like to calculate in an unbound text box, for example,
14 year olds with 1's in the 1Q field.

Any ideas?

Thank you!
tyd
 
K

Klatuu

dcount("*","MyTableName=DateDiff("yyyy",[Birthday],Date())-IIf(Format([Birthday],"mmdd") > Format(Date(),"mmdd"),1,0). and [1Q] = 1)


Tyler Denmead via AccessMonster.com said:
Hi,

I would like to do a dcount using two criteria.

One criteria is located in the form named "Student Data Entry" in an
unbound text box named "Age" that calculates a student's age using this
formula: =DateDiff("yyyy",[Birthday],Date())-IIf(Format([Birthday],"mmdd")
Format(Date(),"mmdd"),1,0). [Birthday] is the field in the query "Student
Data Entry," the source for the form. Students are typically 14-18.

The second criteria is a field named "1Q" in the same form. The data can
be 1-4.

So, in a report, I'd like to calculate in an unbound text box, for example,
14 year olds with 1's in the 1Q field.

Any ideas?

Thank you!
tyd
 

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