Type mismatch in expression.

G

Guest

I am trying to run an update query and I keep getting the "Type Mismatch in
expression" error message. I have gone through and double checked that all of
the fields in both tables have the same data type. The only thing I can think
of is that [Activity Log].[Activity #] is a text box that contains either
text or a numeric value. If that is the problem, I'm not sure how to correct
it. The query is as follows:

UPDATE Passdown INNER JOIN [Activity Log] ON (Passdown.[B-I Priority] =
[Activity Log].[I Priority]) AND (Passdown.[B-P Priority] = [Activity Log].[P
Priority]) AND (Passdown.[Date B] = [Activity Log].[Date B]) AND
(Passdown.[Activity #] = [Activity Log].[Activity #])
SET Passdown.[Activity #] = [Activity Log].[Activity #], [Date B] =
[Activity Log].[Date B], Passdown.[B-P Priority] = [Activity Log].[P
Priority], Passdown.[B-I Priority] = [Activity Log].[I Priority]
WHERE (Passdown.[V Name]=[Activity Log].[Vl]) AND (Passdown.[Primary
VIN]=[Activity Log].[I Number]) AND ([Activity Log].[P Priority]<>"MISSED")
AND ([Activity Log].[Date B]>DateAdd("d",-1,Passdown.[Date A])) And
([Activity Log].[Date B]<DateAdd("d",6,Passdown.[Date A]));
 
J

John W. Vinson

I am trying to run an update query and I keep getting the "Type Mismatch in
expression" error message. I have gone through and double checked that all of
the fields in both tables have the same data type. The only thing I can think
of is that [Activity Log].[Activity #] is a text box

If Activity Log is a table then it doesn't contain "text boxes".

What is the Data Type (in table design view) of [Activity #] in each table?

Is it a Lookup Field in either table? If so, what you see on the screen is
*not* what is actually stored, and you'll get errors like this.

John W. Vinson [MVP]
 
G

Guest

In both tables [Activity #]'s Data Type is Text and under the tab for Lookup
it is a textbox.

John W. Vinson said:
I am trying to run an update query and I keep getting the "Type Mismatch in
expression" error message. I have gone through and double checked that all of
the fields in both tables have the same data type. The only thing I can think
of is that [Activity Log].[Activity #] is a text box

If Activity Log is a table then it doesn't contain "text boxes".

What is the Data Type (in table design view) of [Activity #] in each table?

Is it a Lookup Field in either table? If so, what you see on the screen is
*not* what is actually stored, and you'll get errors like this.

John W. Vinson [MVP]
 
G

Guest

Sorry, i figured out the problem.

Clancy said:
In both tables [Activity #]'s Data Type is Text and under the tab for Lookup
it is a textbox.

John W. Vinson said:
I am trying to run an update query and I keep getting the "Type Mismatch in
expression" error message. I have gone through and double checked that all of
the fields in both tables have the same data type. The only thing I can think
of is that [Activity Log].[Activity #] is a text box

If Activity Log is a table then it doesn't contain "text boxes".

What is the Data Type (in table design view) of [Activity #] in each table?

Is it a Lookup Field in either table? If so, what you see on the screen is
*not* what is actually stored, and you'll get errors like this.

John W. Vinson [MVP]
 

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