Automatic Number with text!?

maildodge

New member
Local time
Today, 19:03
Joined
Aug 22, 2004
Messages
5
Ok, I know you cannot have an autonumber with text.

But I need an order number to be created that automatically increases, the catch is it also needs a letter infront of it, eg..

D0001, D0002, upto D9999

then it will move onto:

E0001, E0002, upto E9999

etc.

Is this possible?

To be honest I have no idea how it can be done. I have some access knowledge but not done it for years so got to refresh my memory.

Thanks alot for any help.
 
What happens after Z9999?

I would suggest that you store the alpha [A,B,C, etc] in one field and the numbers in another field. You would need to use a DMax to determine the current maximum number [then increment it by + 1] and also determine the maximum letter [your order of events will be important]. Search the forum for 'custom auto numbers' and the 'DMax' function for there are examples out there.
 
well i can only help you with the following
us the autonumber in manual fashion

me.fieldname = DMax("[FieldName]","FormName")+1

make and other field and add a alphabeticall value in it and then in the third text box concatenate both the textboxex

not a decent way but i belive that this wil help in what u are achieving
 
It would be some time until Z9999 got used. But after that I think the database would have to be restarted (I know not perfect, but dont want to worry about that yet)

Thanks for advice given. Im going to try playing around with what you both have said. But not sure how to do it :eek:

Think im out of practice :D but will give it my best shot.

Any other ideas would be great.
 
Im going to try playing around with what you both have said. But not sure how to do it

hmmm
well put the above code on the command button click event

and us concatenation method to get the two fields in one
 
Think I finally got it sorted thanks to all you guys.

Again thanks for the help and the examples. :D
 

Users who are viewing this thread

Back
Top Bottom