How to append running number

B

Boon

Hello,

I have a table A. the first field in table A is called ID. the data type is
integer.

I have created a query. In this query I would like to be able to append data
in to table A, with one specific thing. I would like to be able to append
the row number to column ID in table A.

For intance, if table A is empty, and I apeend 10 records to table A, I want
column ID to have number 1 through 10 when appending.

if table A has 20 records. and I append 10 records to table A, I want column
ID to have number 21 through 30 for my newly appending records.



thanks!
Boon
 
L

Lynn Trapp

Does this ID number have to be sequential, without any gaps? If not, you
should consider using an AutoNumber field for that field. If yes, you will
probably need to write a vba function to accomplish what you want.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top