Still working on the same problem as my earlier post today. Trying to avoid calling the query optimizer so many times in a VBA loop by using a parameter query. Tried two versions of a stored query: one with hard-wired criteria and one with parameters. Double-clicking this query from the database window generates a message that 699 rows will be updated. I cancel the actual updating, leaving the records unchanged.

UPDATE TimeLine INNER JOIN qryGPSPosSelectedWithoutATIIDfk ON TimeLine.MachineID = qryGPSPosSelectedWithoutATIIDfk.MachineID
SET qryGPSPosSelectedWithoutATIIDfk.ATIIDfk = timeline.Recnum
WHERE (((qryGPSPosSelectedWithoutATIIDfk.TimeTag)>=[starttime] And (qryGPSPosSelectedWithoutATIIDfk.TimeTag)<[stoptime])
AND ((qryGPSPosSelectedWithoutATIIDfk.MachineID)=6)
AND ((TimeLine.MachineID)=6)
AND ((TimeLine.ZoneID)=70)
AND ((Int([TimeLine].[Starttime]))=40247));

Running this query using the same criteria expressed as parameters generates a message that zero rows will be updated.

UPDATE TimeLine INNER JOIN qryGPSPosSelectedWithoutATIIDfk ON TimeLine.MachineID = qryGPSPosSelectedWithoutATIIDfk.MachineID
SET qryGPSPosSelectedWithoutATIIDfk.ATIIDfk = timeline.Recnum
WHERE (((qryGPSPosSelectedWithoutATIIDfk.TimeTag)>=[starttime] And (qryGPSPosSelectedWithoutATIIDfk.TimeTag)<[stoptime])
AND ((qryGPSPosSelectedWithoutATIIDfk.MachineID)=[GPSMachineID])
AND ((TimeLine.MachineID)=[ATIMachineID])
AND ((TimeLine.ZoneID)=[CurrentZoneID])
AND ((Int([TimeLine].[Starttime]))=[DayNo]));

Running this VBA snippet against the same parameter query and with the correct values in the different variables also updates zero records