Auto Populate

bluenose76

Registered User.
Local time
Today, 10:53
Joined
Nov 28, 2004
Messages
127
I would like to create something that is going to increace a value by one automatically.

I have a field on my form and in that field i will enter a unique record specific number, i woul like that field to know that we have allready used lets say up to 009 so the next time someone clicks in this field it will automatically g to 010 and so on.

I have been tryign to get a macro to work but i am obviously using the wrong commands?

Any ideas? :confused:
 
Try This.............

I would have a second hidden field generating a auto number. Then within a query check for the length of this auto number field and add the correct number of leading zeros and insert into the the field you want to display....

IF LEN([AUTO NUMBER FIELD])=1,"000" & [AUTO NUMBER FIELD],etc.....

I have used this method a number of times on auto number fields with leading zeros.

Regards,
DALIEN51
 
have you considered using an Autonumber ?
 
I have tried using auto numbers but then had trouble resetting it? i shall attempt the other method given

Cheers
 
Increment number

Try the DMax function and put it in the On Click Event.

= Nz(DMax("[yourfield]", "yourtable"), 0) + 1

Good Luck.
Trucktime
 

Users who are viewing this thread

Back
Top Bottom