Sequential numbering of records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am using an append query to move records to a table for future export out
of Access. However, I need to find a way to sequentially number each record
before I export them. I need to do an incremental numbering sequence
(1,2,3,...) that restarts each time I am ready to export. I think that an
append query will work, but I can't figure out how to get the sequencing to
work. I'm sure it's a simple answer, but I'm just missing it. Thanks in
Advance for any help

Brian
 
Here is a little trick that will reset the auto number field. You will need
to empty the old data out anyway, so create a function that will do this all
for your:

CURRENTDB.Execute("DELETE * FROM MyTransferTable;")
set rst = currentdb.OpenRecordset("MyTransferTable", dbopendynaset)
With rst
.AddNew
!tMy_Auto_Field = 0
.Update
.Delete
.Close
End With

Set rst = nothing
 
Back
Top