"Type in mismatch in expression"

knice11

Registered User.
Local time
Today, 16:14
Joined
Jun 14, 2011
Messages
20
What is wrong when I see this error message? I was tryng to run the query I created and this popped up. I needed the query to use two fields a po received units field and a fiscal week field. Could this be the problem? If so, how can I fix the query to show me the # of units received by the fiscal week? Do I need to include other fields to get the result of the # of units recieved by fiscal week? Thanks in advance.
 
I think you may need something like this:


SELECT YourTblName.FiscalWeek, Count(YourTblName.PoReceivedUnits ) AS CountOfPoReceivedUnits
FROM YourTblName
GROUP BY YourTblName.FiscalWeek;

The type in Red would need to be replaced with the names of your tables/fields.
 
Bob,

Couple of questions. 1. I am using access 2003, does that have a difference in that code? 2. The fields PO Received Units and fiscal week are on two different tables. Will this also make a difference? I know I would need to make them have some kind of relationship, correct? The code you wrote, though is dead on. Just wondering if things would change with the two questions above.
 
1)I also use A2003 but it shouldn't make any difference which version is used.

2)Yes, the code I gave only refers to one table and it would not work with two tables (as is)
 
Could I connect the two tables using either left outer join or right outer join? If these are not the solution, how do I correct the from part in the code to pull from both tables? Your help is greatly appreciated.
 
Yes I think that should work if there is relationship between the 2 tables.
Try it out and let us know how you get on :)
 

Users who are viewing this thread

Back
Top Bottom