How to auto increment number in Access Table through VB form

How to auto increment number in Access Table through VB form

Post by Shaikh Muhammed Ari » Wed, 25 Apr 2001 21:51:35



Hi dudes

i have a table in access 2000 and in that i have a field called inv_no

i want to autincrement this field every time with 1 when the records are saved..

to be more precise, i want to create some thing like sequence or scale of oracle and Sql server..

i hope u got my point..

e,g:- if the  value of inv_no is - 1
so the next time i save the record it should be 2 and so on...

Shaikh Muhammed Arif

URL:- http://kgn_arif.tripod.com/kgnss
Tel.:- 91-22-510 4837
Cell.:- 98200-21527

 
 
 

How to auto increment number in Access Table through VB form

Post by Scott Hale » Wed, 25 Apr 2001 23:56:41


Just set the datatype of the field inv_no to AutoNumber, and when you are
doing inserts ignore this field.  Access will automatically populate it with
the next number in the sequence.



Hi dudes

i have a table in access 2000 and in that i have a field called inv_no

i want to autincrement this field every time with 1 when the records are
saved..

to be more precise, i want to create some thing like sequence or scale of
oracle and Sql server..

i hope u got my point..

e,g:- if the  value of inv_no is - 1
so the next time i save the record it should be 2 and so on...

Shaikh Muhammed Arif

URL:- http://kgn_arif.tripod.com/kgnss
Tel.:- 91-22-510 4837
Cell.:- 98200-21527

 
 
 

How to auto increment number in Access Table through VB form

Post by VB/HAC » Sun, 06 May 2001 03:26:01


What if you are creating the db from VB with dao. (so users can have
multiple or new databases)?  Is there a way to assign the Autonumber
property to a field from within VB, using access only as a back end?????


> Just set the datatype of the field inv_no to AutoNumber, and when you are
> doing inserts ignore this field.  Access will automatically populate it
with
> the next number in the sequence.



> Hi dudes

> i have a table in access 2000 and in that i have a field called inv_no

> i want to autincrement this field every time with 1 when the records are
> saved..

> to be more precise, i want to create some thing like sequence or scale of
> oracle and Sql server..

> i hope u got my point..

> e,g:- if the  value of inv_no is - 1
> so the next time i save the record it should be 2 and so on...

> Shaikh Muhammed Arif

> URL:- http://kgn_arif.tripod.com/kgnss
> Tel.:- 91-22-510 4837
> Cell.:- 98200-21527