Hey guys...
I've created a query that I need to put a sequential counter into. I'm using the DCount function against an autonumber primary key field (ID). For some reason or another in this particular query my counter is returning the same number as in my ID field. Any suggestions would be greatly appreciated!!
SELECT DCount("ID","[Room Bed Table]","ID<="& ID) AS [Counter], [Room Bed Table].ID, [Room Bed Table].[Facility ID], [Room Bed Table].[Facility Description], [Room Bed Table].[Unit ID], [Room Bed Table].[Room ID], [Room Bed Table].[Room Description], [Room Bed Table].[Location Comment], [Room Bed Table].Pic1, [Room Bed Table].Pic2, [Room Bed Table].Pic3
FROM [Room Bed Table]
WHERE ((([Room Bed Table].[Facility Description])="Voorhees") AND (([Room Bed Table].[Unit ID])="PICU")) OR ((([Room Bed Table].[Facility Description])="Voorhees") AND (([Room Bed Table].[Unit ID])="PCU")) OR ((([Room Bed Table].[Facility Description])="Voorhees") AND (([Room Bed Table].[Unit ID])="ICU"))
ORDER BY [Room Bed Table].ID;