HarrySpencer
Registered User.
- Local time
- Today, 00:25
- Joined
- Apr 10, 2007
- Messages
- 25
Hello
Please can someone give mesome advice on my DCount statement. I'm using the statement that will count the number of records (people) with an age of 18 who are connect to a certain establishment. The age only needs to be calculated at certain times of the year so it is stored in the table as a number. There are only two tables Establisment and Person.
I've looked at so many examples of DCount on this forum and MSDN but haven't been able to get this to work. The closest I've got is a Type Mismatch error.
Count18Years = DCount("[Age]", "[Person_tb]", "[Age]" = 18 And "[EstabID]" = EstabRecordsNumber)
Please can anyone help.
Cheers, Harry
Please can someone give mesome advice on my DCount statement. I'm using the statement that will count the number of records (people) with an age of 18 who are connect to a certain establishment. The age only needs to be calculated at certain times of the year so it is stored in the table as a number. There are only two tables Establisment and Person.
I've looked at so many examples of DCount on this forum and MSDN but haven't been able to get this to work. The closest I've got is a Type Mismatch error.
Count18Years = DCount("[Age]", "[Person_tb]", "[Age]" = 18 And "[EstabID]" = EstabRecordsNumber)
Please can anyone help.
Cheers, Harry