how to autonumber(text) with 2 front number

hyoasakura

New member
Local time
Tomorrow, 06:38
Joined
May 25, 2014
Messages
2
Hi all , i have problem with Access VBA about auto numbering

Table name : test
field: idNum = text
remarks= text

idNum = 01.001
01.002
02.001

the problem is ..when i click new id order by combobox/textbox (01) the result is 01.003 and when the combobox/textbox (02) then the result is 02.002 how the VBA ..can anyone give me the example....

regards
 
can u give more detail , what u r trying to do, what shud form do what shud vba do?
 
i want auto generate

example :
ID
01001 ==> 01 is dept finance code
01002
02001 ==> 02 is dept xxx code

when i choose finance the code auto generated to be 01003
and when i choose xxx dept code will be 02002

i need the code
can someone give me the example ..:(
i tried 2 days for this case...:banghead:
 
Autonumbers are defined as long integers ie you cannot have decimal points.

I make it a rule to never use Autonumbers for storing any attribute that is significant to the user. Autonumber should be hidden from the User and only used as a unique identifier in your system.

Use a separate field to hold your account code. That way you can have any format you like.
 
store first number in a table called StartAN
then use query to filter dept code and expr. to increase by 1

Google vba for this if req. thru vba only .
 

Users who are viewing this thread

Back
Top Bottom