I am trying to use DCount in a query as an expression to return a value of a count in a table.
My table name is SerialTest and the field name is ModelID. My table has three fields, SerialID, Serial Number and ModelID. The SerialID is the primary key , the Serial Number is a field that the user enters with a new serial number and the ModelID field is a list of three different numbers that the user would select depending on what type of machine it is. I need to know how many total entrees there are for model ID's using 1 and 2. For example,
Serial ID Serial Number ModelID
1 1234 1
2 8765 1
3 7623 2
4 0973 3
5 2323 1
In this example it would return 4 as the result because there are 3 number 1's and 1 number 2
I am using
This is throwing an error. What am I doing wrong or what is another way to count the entrees from a query?
Thanks
Rick
My table name is SerialTest and the field name is ModelID. My table has three fields, SerialID, Serial Number and ModelID. The SerialID is the primary key , the Serial Number is a field that the user enters with a new serial number and the ModelID field is a list of three different numbers that the user would select depending on what type of machine it is. I need to know how many total entrees there are for model ID's using 1 and 2. For example,
Serial ID Serial Number ModelID
1 1234 1
2 8765 1
3 7623 2
4 0973 3
5 2323 1
In this example it would return 4 as the result because there are 3 number 1's and 1 number 2
I am using
Code:
Expr1: DCount("ModelID","SerialTest","ModelID = '1, 2'")
This is throwing an error. What am I doing wrong or what is another way to count the entrees from a query?
Thanks
Rick