Type Mismatch in Expression

D

Deepak

What does Type Mismatch in Expression mean? And how can I
get my form to function when it does this?
 
R

Ryan Cauchi-Mills

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.
 
R

Ragnar Midtskogen

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top