rluciano
IS-IT--Management
- Jul 30, 2007
- 11
I created a macro that sets the value of a new CLIENT_ID
based on certain values.
Heres the expression
I want the CLIENT_ID to follow this convention
Example
Supplier File Code = AA
Total # of Clients for Supplier AA=100
New CLIENT_ID should be
AA0707000101
First Characters will be set is the supplier file code, next two digits are the year formatted as such, next two digits are the month formatted as such. After that I need 6 digits to accomodate for the client number. I am setting the value of the CLIENT_ID with the expression shown above. Any suggestions on how to keep the six digits while I set the next client number by (Total Clients]+1 if lets say the next client number would be 3. The way I have it now, the result is:
AA07070003
A different way is all good too.
based on certain values.
Heres the expression
Code:
[Forms]![NEW_CLIENT]![Supplier File Code]+''+Format(Date(),"yy")+''+Format(Date(),"mm")+''+'000' & [Forms]![NEW_CLIENT]![Total Clients]+1
I want the CLIENT_ID to follow this convention
Example
Supplier File Code = AA
Total # of Clients for Supplier AA=100
New CLIENT_ID should be
AA0707000101
First Characters will be set is the supplier file code, next two digits are the year formatted as such, next two digits are the month formatted as such. After that I need 6 digits to accomodate for the client number. I am setting the value of the CLIENT_ID with the expression shown above. Any suggestions on how to keep the six digits while I set the next client number by (Total Clients]+1 if lets say the next client number would be 3. The way I have it now, the result is:
AA07070003
A different way is all good too.