I defined a long integer field in my table & then set a globalField in a standard module as Long also. Then I set up a Dmax function using the two fields but I get an error that the criter has mismatched data types. Can someone recommend why this is?
x = DMax("eventnumber", "testqry", "regionaldirectorcode= '" & glblDirCode & "'")
regionaldirectorcode is a long integer in the table definition
glblDirCode is a Long in the standard module
“error is 3464 The criteria expression in a Find method is attempting to compare a field with a value whose data type does not match the field’s data type.”
x = DMax("eventnumber", "testqry", "regionaldirectorcode= '" & glblDirCode & "'")
regionaldirectorcode is a long integer in the table definition
glblDirCode is a Long in the standard module
“error is 3464 The criteria expression in a Find method is attempting to compare a field with a value whose data type does not match the field’s data type.”