create next highest number

G

Guest

Could someone give me an examble of how to use a VBF to create the next
highest number in the database. I can not use Auto Number as the table
sometimes needs to exported and then imported back in
 
S

Stefan Hoffmann

hi Burt,

Burt said:
Could someone give me an examble of how to use a VBF to create the next
highest number in the database. I can not use Auto Number as the table
sometimes needs to exported and then imported back in
As query:

INSERT INTO Table (ID, Field1, Field2)
SELECT Nz(Max(ID), 0) + 1, Value1, Value2 FROM Table


mfG
--> stefan <--
 

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