kohdesmond
Technical User
what can we do if we have to get the next autonumber to be inserted {before inserting the record} in MS access
It is a simple think to get the max(id) + 1.But if there is some record deleted then this will not work correctly
for instance i have records
id S_N
11 a
23 b
31 c
45 d
then if delete 45 my record becomes
id S_N
11 a
23 b
31 c
now when i get max(id) +1 it will return 32 {rather then 46 which i want's to retrieve}
Is there any way that i can get the next autonumber to be inserted prior to insertion of the record ?
It is a simple think to get the max(id) + 1.But if there is some record deleted then this will not work correctly
for instance i have records
id S_N
11 a
23 b
31 c
45 d
then if delete 45 my record becomes
id S_N
11 a
23 b
31 c
now when i get max(id) +1 it will return 32 {rather then 46 which i want's to retrieve}
Is there any way that i can get the next autonumber to be inserted prior to insertion of the record ?