papadega3000
Registered User.
- Local time
- Today, 08:01
- Joined
- Jun 21, 2007
- Messages
- 80
I have a table that has two fields which I want to sum the one field based on the other field. The field I want to sum is a number data type and the other is a text data type. My research has pointed me in the direction of using this line of code.
totalP = DSum("[FieldX]", "TableName", "[CriteriaField] = HAVING ?")
My issue is in the criteria area. I will have a number of records that have matching CriteriaField text and I want to add them up. The issue is what syntax do I use to say that I want to Sum all records that contain the same criteriaField. The text field is in this format 1.1.1.
Is there a special function that lets me match text?
Thanks,
totalP = DSum("[FieldX]", "TableName", "[CriteriaField] = HAVING ?")
My issue is in the criteria area. I will have a number of records that have matching CriteriaField text and I want to add them up. The issue is what syntax do I use to say that I want to Sum all records that contain the same criteriaField. The text field is in this format 1.1.1.
Is there a special function that lets me match text?
Thanks,