Well, you haven't shared much information with us so I will have to make up some of the details here.
Assuming then, you have a table [tblTest3] with two numeric fields [FirstVal] and [OrdinalVal].
In a fully mature RDBMS the following SQL could probably work, but due to limitations within Access this is not supported.
- UPDATE tblTest3 AS tTO
-
SET OrdinalVal=(SELECT Max(Nz([OrdinalVal],0))+1
-
FROM tblTest3 AS tTI
-
WHERE tTI.FirstVal=tTO.FirstVal)
-
WHERE [OrdinalVal] Is Null
In view of this I can only suggest you use some VBA code to process through the table in order of [FirstVal]. Simply incrementing as you go.