By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,837 Members | 1,363 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,837 IT Pros & Developers. It's quick & easy.

Sum query: Data type mismatch in criteria expression

P: n/a
Hello!
I have created a very simple query like this:

SELECT Tasks.Name, DurationHrs([Log.DateTimeFrom],[Log.DateTimeTo]) AS
Duration
FROM Tasks INNER JOIN Log ON Tasks.TaskID=Log.TaskID;

The above query works fine. "Tasks.Name" is a "Text" field with
description of task, while "DurationHrs" is a VB function that
calculates number of hours between two "DateTime" values and returns
result of type "Single".

However, when I try to sum these hours of type "Single" in a query like
this:

SELECT Tasks.Name,
Sum(DurationHrs([Log.DateTimeFrom],[Log.DateTimeTo])) AS Duration
FROM Tasks INNER JOIN Log ON Tasks.TaskID = Log.TaskID
GROUP BY Tasks.Name;

.... I get an error "Data type mismatch in criteria expression. (Error
3464)".

What could possibly be wrong?
Thanks in advance!
Kind regards,
Igor

Jan 27 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Answered in your post 7 minutes earlier.
Jan 27 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.