data type mismatch in critera

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

But I have no criteria expression in the query so why is this message being
shown?

Any ideas?
 
SELECT DISTINCT tble_Query.QueryID, tble_Query.Qry_ELS,
tble_PrevAct.Act_Dept, tble_Query.SLA_Date3, tble_Query.SLA_Date4,
WorkingDays2([SLA_Date3],[SLA_Date4]) AS Days4
FROM tble_Query INNER JOIN tble_PrevAct ON tble_Query.QueryID =
tble_PrevAct.QueryID;


If I take out the "WorkingDays2" function then the query works fine.
 
I would suspect the WorkingDays2 is expecting a dateTime field and is either
getting a null value for one of the two fields or a string value instead of
a datetime value.

By any chance is the date being formatted in tbl_query? That does turn it
into a string.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

scubadiver said:
SELECT DISTINCT tble_Query.QueryID, tble_Query.Qry_ELS,
tble_PrevAct.Act_Dept, tble_Query.SLA_Date3, tble_Query.SLA_Date4,
WorkingDays2([SLA_Date3],[SLA_Date4]) AS Days4
FROM tble_Query INNER JOIN tble_PrevAct ON tble_Query.QueryID =
tble_PrevAct.QueryID;


If I take out the "WorkingDays2" function then the query works fine.


--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


scubadiver said:
But I have no criteria expression in the query so why is this message
being
shown?

Any ideas?
 
The query logic for the info I wanted wasn't correct and I have sorted it
out. Thanks for the heads up.

John Spencer said:
I would suspect the WorkingDays2 is expecting a dateTime field and is either
getting a null value for one of the two fields or a string value instead of
a datetime value.

By any chance is the date being formatted in tbl_query? That does turn it
into a string.

--
John Spencer
Access MVP 2002-2005, 2007
Center for Health Program Development and Management
University of Maryland Baltimore County
..

scubadiver said:
SELECT DISTINCT tble_Query.QueryID, tble_Query.Qry_ELS,
tble_PrevAct.Act_Dept, tble_Query.SLA_Date3, tble_Query.SLA_Date4,
WorkingDays2([SLA_Date3],[SLA_Date4]) AS Days4
FROM tble_Query INNER JOIN tble_PrevAct ON tble_Query.QueryID =
tble_PrevAct.QueryID;


If I take out the "WorkingDays2" function then the query works fine.


--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


scubadiver said:
But I have no criteria expression in the query so why is this message
being
shown?

Any ideas?
 
Back
Top