I am looking to generate a total number of a given column based on two criteria.
I would like a label (or textbox if necessary) to display a given total of "Active" devices based on a given month.
The table name is "Blackberry" and the specific columns I would like to check would be "Activated?" and "Registration Date". I'm not sure if I should be using a dsum or dcount and the error i keep getting is a type mismatch.
An active device would have the text value of "Yes
This was the code I have tried, not sure if i'm on the right track at all, but any pointers in the right direction would be very appreciated.
Dim advalue As Integer
advalue = DCount("[Activated?]", "Blackberry", "[Activated?]=yes" And "[Registration Date] > #01/01/2000#")
lblad.Caption = advalue
Garrett
I would like a label (or textbox if necessary) to display a given total of "Active" devices based on a given month.
The table name is "Blackberry" and the specific columns I would like to check would be "Activated?" and "Registration Date". I'm not sure if I should be using a dsum or dcount and the error i keep getting is a type mismatch.
An active device would have the text value of "Yes
This was the code I have tried, not sure if i'm on the right track at all, but any pointers in the right direction would be very appreciated.
Dim advalue As Integer
advalue = DCount("[Activated?]", "Blackberry", "[Activated?]=yes" And "[Registration Date] > #01/01/2000#")
lblad.Caption = advalue
Garrett