Type mismatch

  • Thread starter sierralightfoot
  • Start date
S

sierralightfoot

In a access query how can i find out which field(s) are creating a type
mismatch error?
 
M

Mike Painter

sierralightfoot said:
In a access query how can i find out which field(s) are creating a
type mismatch error?

A type mismatch comes from entering the wrong type of data into a field.
You would have to build a query that did this and I imagine it would take a
bit of time.

Since the error message only shows when you actually do it it will probably
be easier to fix the code or tell people to stop putting letters into date
or number fields.
 
B

Bob Quintal

=?Utf-8?B?c2llcnJhbGlnaHRmb290?=
But I don't know which field is causing the problem.
.
Nobody here except you can see your database. We don't know what type
of query, the datatypes of the fields in the tables that underlie the
query, what calculations or expressions you have included in the
query.

Some things to check for
Joined fields are different type or size.
Numeric fields getting text data.
Filters on lookup fields.

Q
 
B

Bob Quintal

=?Utf-8?B?c2llcnJhbGlnaHRmb290?=
got all that stuff. joined fields have to be same size?

well if you have one number field as integer size and the other as
double, you will have problems. If you put 22 characters in one text
field and only can put 12 in the other, you may not get the type
mismatch error, but you will have problems.
 
M

Mike Painter

sierralightfoot said:
But I don't know which field is causing the problem.

"Mike Painter" wrote:

It's a mismatch so all you have to do is go to the tables involved and make
sure they are the same type.
The most common for me has been in foreign keys.

One field does not cause the problem, it is the programmer who is at fault.
 
T

Tom Wickerath

Hi Sierra,

Make a copy of your query. If all other efforts fail, try deleting a field,
and then run the query. Keep doing this sequence, one field at a time, until
the query runs without producing the Type Mismatch error. The last field you
removed is likely implicated.


Tom Wickerath
Microsoft Access MVP
http://www.accessmvp.com/TWickerath/
__________________________________________
 

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