emmanuelkatto24
New member
- Local time
- Today, 05:38
- Joined
- Oct 17, 2024
- Messages
- 12
Hi everyone,
I’m Emmanuel Katto from Dubai, United Arab Emirates (UAE) new to Access and could use some assistance. I have a table with two fields: Customer Code and Customer Type (with options for Retail or Wholesale). I want to generate a unique customer code that consists of the first letter of the customer type, the current date, and a random number at the end. This code needs to be indexed and unique.
Here’s what I’ve done so far:
Thanks in advance for your help!
Regards
Emmanuel Katto
I’m Emmanuel Katto from Dubai, United Arab Emirates (UAE) new to Access and could use some assistance. I have a table with two fields: Customer Code and Customer Type (with options for Retail or Wholesale). I want to generate a unique customer code that consists of the first letter of the customer type, the current date, and a random number at the end. This code needs to be indexed and unique.
Here’s what I’ve done so far:
- I created a combo box for selecting the Customer Type.
- I have an unbound text box that uses an IIF statement to get the initial (R or W) based on the customer type selection.
- I can create an unbound text box to generate the code in the format CustomerT & Date & Random Number, but this code isn't indexed and doesn't save back to the table.
- If I bind the Customer Code field to the table with a default value like W-Date-RndN, it doesn’t update when I change the customer type since it’s bound to the table.
Thanks in advance for your help!
Regards
Emmanuel Katto