I
Igor Barbaric
Hello!
I get error message "Data type mismatch in criteria expression" when I
try to run sum on "Single" field.
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
I get error message "Data type mismatch in criteria expression" when I
try to run sum on "Single" field.
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