Custom autonumber

krishnanhemanth

Registered User.
Local time
Tomorrow, 02:05
Joined
Jun 12, 2009
Messages
115
Hi everybody
Iam trying to use a custom auto number as a primary key in tables

i used the below code on the form current() event.
Me!VMRCOUNT.DefaultValue = Nz(DMax("[VMRCOUNT]", "VENDORMATERIALRECIEPTSUB"), 0) + 1

the problem is that it dosent generate number after 10

to put it more simple
VMRCOUNT-----a filed in the table VENDORMATERIALRECIEPTSUb
VMRCOUNT NEEDS TO BE A CUSTOMISED AUTONUMBER like...
VMRC-1
VMRC-2
VMRC-3and so on
The above code generates up to VMRC-10 and dosent continue.
the format i have used in the FORMAT field is "VMR- 0000"&&&&& on the form
Please help
thanks in advance
 
Why not use a default autonumber, save you the hastle of all this... Then simply upon showing or reporting or anything to the user simply prefix the VMRC- to it??
 
thanks for the reply

I solved it myself
the problem is that the FIELD type has to be "NUMBER" type
MY filed type was in "TEXT"
Now its working fine
 

Users who are viewing this thread

Back
Top Bottom