Hi I need to create a Autonumber field in a table with the following starting value 13-642-2000.
Please advice
Hi I need to create a Autonumber field in a table with the following starting value 13-642-2000.
Please advice
OK, so what are the rules for how this value is supposed to increment? There are a multitude of possibilities with a value like that.
Morning,
Its supposed to increment by one...13-642-2000, 13-642-2001 ans so on
It appears that you have embedded significance in the code. How do you interpret/decipher the code?
Suggest you use atomic fields/values and concatenate for display if that's important to you.
13= to fiscal year
642= Division number
2000= purchase number
How do I concentrate on increasing the purchase number
As Orange mentioned, these values should be stored in separate fields and concatenated for display where necessary. As far as incrementing the Purchase Number, that would be done in the Before Update event of your form. Example;
If Me.NewRecord Then Me!PurchaseNumber = DMax("PurchaseNumber", "YourTable")+1