MoveLast

  • Thread starter Thread starter Tony G
  • Start date Start date
T

Tony G

l have a database with auto numbering, l use this number
to link all sub forms. to get the next number l use
rs.movelast
Id = rs + 1
this has been work right up til now, rs does not return
the next number. It always returns number 535, is there
any way l can fix this.

TYIA

Tony G
 
The records in the table are not necessarily in any order. If you based the recordset on a
query sorted on the field with the number, then the last one should be the largest.
However, you may find the DMax function to work better. It will give you the largest value
in a field.

Also, don't count on autonumbers to give you anything other than a unique number. Don't
rely on them being in any order, they usually are, but no guarantees. If you need
sequential numbers, make your own and store them in the field. If that is what you are
doing, that's fine. It is the built in Autonumber option for a field that I am referring
to.
 
Back
Top