Need Help With Some VB

Milan

Registered User.
Local time
Today, 17:27
Joined
Feb 17, 2002
Messages
85
Can Anyone Help!! I am wanting to create an autonumber using vba. I do not want to use the autonumber, as it skips numbers etc. Basically i have an invoice and i want to increment the invoice number +1 by using vb code.

Would be grateful for some help
 
Just curious, what do you mean autonumber skips numbers? I have seen a number missing in sequence only when a record has been deleted?
 
Rich is correct ... use the DMax() function to retrieve the highest number stored in the table for that specific field and add 1 to it to get the next number.

To jwindon .........
When using an Autonumber datatype, if for any reason you don't complete a new record or the entry of a new record is canceled ... the Autonumber will skip a number.

HTH
RDH

[This message has been edited by R. Hicks (edited 02-17-2002).]
 

Users who are viewing this thread

Back
Top Bottom