Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dim rst as DAO.recordset, dbs as DAO.database
Dim lngCount as long, lngX as long
Dim strSQL as string
set dbs = currentdb()
'here is the trick, if you want a specific order, the
'SQL statement must reflect the order
'strSQL = "Your select statement with order by"
'set rst = dbs.openrecordset(strSQL)
'or reference the table, if you are not concerned
'about the order...
set rst = dbs.openrecordset ("YourTableName")
lngX = 0
with rst
rst.movelast
lngCount = rst.recordcount
'now you have the number of records...
'similar to the DCount... statment
rst.movefirst
while not .eof
lngX = lngX + 1
.edit
!YourRecordNumbebr = lngX
.update
loop
end with
rst.close
dbs.close