SteveClarkson
09-09-2009, 05:03 AM
Hello all,
I am puzzled (as usual)...
I have 2 queries in a call logging db, which return a list of events associated with calls be opened, and then the other returns events of calls being closed.
qryCallOpenings:
SELECT tblIncident.IncidentID, tblIncident.PC, tblEvent.EventType, tblEvent.DateTime, tblIncident.User, tblEvent.EnteredBy, tblEvent.Notes
FROM tblIncident INNER JOIN tblEvent ON tblIncident.IncidentID = tblEvent.IncidentID
WHERE (((tblEvent.EventType)=1));
qryCallClosings:
SELECT tblIncident.IncidentID, tblIncident.PC, tblEvent.EventType, tblEvent.DateTime, tblIncident.User, tblEvent.Notes
FROM tblIncident INNER JOIN tblEvent ON tblIncident.IncidentID = tblEvent.IncidentID
WHERE tblEvent.EventType=2;
Independantly, I can run both of these queries, and they are absolutely fine.
However, when used in this query:
SELECT qryCallOpenings.IncidentID, qryCallOpenings.PC, qryCallOpenings.User, qryCallOpenings.DateTime AS Reported, DateDiff("d",[Reported],Now()) AS TimeSinceReport, qryCallClosings.IncidentID AS ClosedID
FROM qryCallOpenings LEFT JOIN qryCallClosings ON qryCallOpenings.IncidentID = qryCallClosings.IncidentID
WHERE (((qryCallClosings.IncidentID) Is Null));
I get an error telling me that:
"ODBC Call Failed
The multi-part identifier "MS1.EventType" could not be bound. (#4104)"
VERY odd methinks? I can only assume I'm missing something REALLY obvious!
Sorry - can anyone help me? :confused:
I am puzzled (as usual)...
I have 2 queries in a call logging db, which return a list of events associated with calls be opened, and then the other returns events of calls being closed.
qryCallOpenings:
SELECT tblIncident.IncidentID, tblIncident.PC, tblEvent.EventType, tblEvent.DateTime, tblIncident.User, tblEvent.EnteredBy, tblEvent.Notes
FROM tblIncident INNER JOIN tblEvent ON tblIncident.IncidentID = tblEvent.IncidentID
WHERE (((tblEvent.EventType)=1));
qryCallClosings:
SELECT tblIncident.IncidentID, tblIncident.PC, tblEvent.EventType, tblEvent.DateTime, tblIncident.User, tblEvent.Notes
FROM tblIncident INNER JOIN tblEvent ON tblIncident.IncidentID = tblEvent.IncidentID
WHERE tblEvent.EventType=2;
Independantly, I can run both of these queries, and they are absolutely fine.
However, when used in this query:
SELECT qryCallOpenings.IncidentID, qryCallOpenings.PC, qryCallOpenings.User, qryCallOpenings.DateTime AS Reported, DateDiff("d",[Reported],Now()) AS TimeSinceReport, qryCallClosings.IncidentID AS ClosedID
FROM qryCallOpenings LEFT JOIN qryCallClosings ON qryCallOpenings.IncidentID = qryCallClosings.IncidentID
WHERE (((qryCallClosings.IncidentID) Is Null));
I get an error telling me that:
"ODBC Call Failed
The multi-part identifier "MS1.EventType" could not be bound. (#4104)"
VERY odd methinks? I can only assume I'm missing something REALLY obvious!
Sorry - can anyone help me? :confused: