How to have two Autonumbers in one table

DaniBoy

Registered User.
Local time
Today, 18:30
Joined
Nov 18, 2001
Messages
174
Hello,
How can I make two feilds ahve an autonumber. Ex:

I want to have my primary key be an autonumber but I also want to make another field to automaticly go up one number for each new record. How can I do that since I am only allowed one autonumber per table?
 
In the On Current event of your form, place this code:

if me.newrecord then

Me.YourFieldName = DMax("YourFieldName", "YourTableName") + 1

else

'do nothing

end if
 

Users who are viewing this thread

Back
Top Bottom