Advice Requested: Customer Code String -
11-07-2005
, 05:02 AM
Hi there,
I have been requested to develop a simple Filemaker database, however I
am native to Access.
A unique customer code is required to be generated by Filemaker. The
customer code is structured as follows:
First 3 characters of customer name, then last character of customer
name then a 2 digit serial number.
i.e. KENTUCKY FRIED CHICKEN would be KENN01
If another company was added which resulted in KENN then the serial
number should increment to 02 (i.e. KENN02).
The serial number should always default to 01 for all new customers
unless the customer code already exists.
Basically I can easily extract the alphabetic characters using left()
and right() functions. I am not sure how to approach the serial
number.
How can I check for a duplicate when creating a new customer code and
then increment the serial number if a duplicate exists?
Any advice will be much appreciated.
Regards,
Nathan |