Greetings,
I have a Table "ENQUETEURS" with a field "NUMBER"(primary key)
Format of this field is ?#########
where ? is A for french people
B for the rest of europe
C for the rest of the world
and # is the number (000000001, 00000002....etc)
I have a form with a control that allows the user to choose nationality, so that the new record gets a number automatically
On the On_Change event of the control, I wrote:
BUT with that I get for instance: A45
whereas I want A000000045...
Any idea how to keep the zeros?!
Thanks in advance.
Jonath
I have a Table "ENQUETEURS" with a field "NUMBER"(primary key)
Format of this field is ?#########
where ? is A for french people
B for the rest of europe
C for the rest of the world
and # is the number (000000001, 00000002....etc)
I have a form with a control that allows the user to choose nationality, so that the new record gets a number automatically
On the On_Change event of the control, I wrote:
Code:
..'for french people
dim number
number = "A" & Mid(Dmax("NUMBER","ENQUETEURS","[NUMBER] between 'A00000000' and 'A999999999'"),2,9)+1
..
BUT with that I get for instance: A45
whereas I want A000000045...
Any idea how to keep the zeros?!
Thanks in advance.
Jonath