Ok made a subquery to grab next value on autonumber, for some reason it works at first then in themiddle it messes up and at end it is correct again.
Here is SQL code
Code:
SELECT [Equipment DownTime].Equipment, [Equipment DownTime].ID,
(SELECT TOP 1 Dupe.ID
FROM [Equipment DownTime] as dupe
where dupe.equipment = [Equipment DOwntime].Equipment and Dupe.ID > [Equipment Downtime].ID) AS NextID
FROM [Equipment DownTime]
WHERE ((([Equipment DownTime].Equipment)="8071 TORO"))
ORDER BY [Equipment DownTime].Equipment, [Equipment DownTime].ID;
Here is picture explaining what it is doing. As you can see in the beginning it is pulling in next ID properly then after 801 it starts grabbing 2362 not 1106, 1131, 1134 etc..??
What is going on here?
Any help appreciate.
Thanks