increment field in query

S

Sue B.

Hello,

I would like to append records with no key to a table with
a key by making the key as I go, just using the max key
(or I could enter it as a parameter) +1 for each appended
record. The table has 5015 records, so I want the first
appended record to be 5016, the second 5017, etc. Thank
you in advance for any help.
 
T

tina

the following is untested, so recommend you try it on a
copy of your db. append this calculated value to the
table's primary key field:

Nz(DMax("FieldName", "TableName") + 1, 1)
 

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