Type Mismatch in Expression

  • Thread starter Thread starter Deepak
  • Start date Start date
D

Deepak

What does Type Mismatch in Expression mean? And how can I
get my form to function when it does this?
 
Type Mismatch occurs when you attempt to evaluate or store a value in a
datatype which cannot contain it.
Example: You cannot store a string in an Integer datatype.
Double-check the datatypes that you are comparing/calculating - make sure
they are large enough and of the right type to house your data.

You would want to solve this error before allowing your form to continue, or
you will end up with corrupt data.
 
Examples of data types are integer, long integer, date, string, single
(floating point number), object etc.

Type mismatch error happens when you are tryining to assign a variable of
one type to another variable of an incompatible type.
Most of the time Access will handle the conversion automatically.
But there are cases where the values are incompatible, such as trying to
assign Null to a string variable. A string can only hold ASCII characters. A
Null value would be the contents of a table field where no entry has been
made.

Ragnar
 
Back
Top