G
Guest
I want use the DCount function but I am having problems with criteria
expression. When I run the code, it keeps telling me there is "data mismatch
in the criteria expression". [Days to Complete] is a field where the data
type is Number. int1 is an integer but I have also made it string.
[ESDStaffName] is a field where the data type is Text. strStaffName is
string. Do I have to change the field [Days to Complete] to a different
data type? Any help is appreciated. Thank you.
intSameDay = DCount("[ID]", "PM Date Errors Asc", "[Days to Complete] ='" &
int1 & "' And [ESDStaffName] = " & "'" & strStaffName & "'")
expression. When I run the code, it keeps telling me there is "data mismatch
in the criteria expression". [Days to Complete] is a field where the data
type is Number. int1 is an integer but I have also made it string.
[ESDStaffName] is a field where the data type is Text. strStaffName is
string. Do I have to change the field [Days to Complete] to a different
data type? Any help is appreciated. Thank you.
intSameDay = DCount("[ID]", "PM Date Errors Asc", "[Days to Complete] ='" &
int1 & "' And [ESDStaffName] = " & "'" & strStaffName & "'")