Dcount Problem?

  • Thread starter Thread starter Tyler Denmead via AccessMonster.com
  • Start date 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
 
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
 
Back
Top