Solved

Data type mismatch

Posted on 2014-04-24
3
315 Views
Last Modified: 2014-04-25
I am trying to run the following query. I keep getting "Data Type Mismatch"

Any ideas? Thanks!

SELECT Sum(qryStatsIndividual.MessagesRecorded) AS SumOfMessagesRecorded, Sum(qryStatsIndividual.TotalNewClients) AS SumOfTotalNewClients, Sum(qryStatsIndividual.BookedTrue) AS SumOfBookedTrue, Sum(qryStatsIndividual.TalkedTo) AS SumOfTalkedTo, Sum(qryStatsIndividual.PercentBooked) AS SumOfPercentBooked, Sum(qryStatsIndividual.FiveMinCallBack) AS SumOfFiveMinCallBack, Sum(qryStatsIndividual.PercentinFive) AS SumOfPercentinFive, "ADAY" AS DateSpec, DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#)) AS Expr1
FROM qryStatsIndividual
GROUP BY "ADAY", DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#))
HAVING (((DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#)))=DateValue(Now())));

Open in new window

0
Comment
Question by:cansevin
3 Comments
 
LVL 12

Expert Comment

by:pdebaets
Comment Utility
I wonder if you might be trying to sum a text field here

Sum(qryStatsIndividual.TalkedTo) AS SumOfTalkedTo

?

If that's not it, make a copy of your query, then remove one column at a time until you find the column that is causing the problem. then check the data type of the field in that column.
0
 
LVL 45

Accepted Solution

by:
aikimark earned 500 total points
Comment Utility
my guess would be
DateValue(Nz([qryStatsIndividual].[DateField],#1/1/1950#))

Open in new window

DateValue() expects a string parameter, but you are passing a date data type.
0
 
LVL 29

Expert Comment

by:IrogSinta
Comment Utility
Perhaps the problem lies in the query called qryStatsIndividual.  Can you post the SQL of that one?
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now