Link to home
Start Free TrialLog in
Avatar of SquaredB
SquaredB

asked on

Autonumber Increment Event

I have a form that uses an autonumber field.  When a new record is created, the form shows "autonumber" in the field.  Only when I start to enter data in another control on the form, does the autonumber field actually display a value.

I would like to use the autonumber field when I generate a new record to create a Ticket Number (the TicketNo field is a test field that is a concatenation of a couple of fields including the autonumber field).

Does anybody know how I would go about using the autonumber field immediately upon creating a new record in the form?  I have tried adding VB code to the OnClick event for a "New Record" command button to no avail.

Thanks in advance.
ASKER CERTIFIED SOLUTION
Avatar of Steve Bink
Steve Bink
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
FYI: once an autonumber value is reserved for a new record, it is totally unusable.  If you delete the new record, or otherwise dispose of it, that number will not be reused by Access.  It will not matter if you have saved the record or not...Access increments the seed at the same time it provides a specific value to a new record.
Avatar of SquaredB
SquaredB

ASKER

Thanks.  Exactly what I needed.