Primary key question

donward

New member
Local time
Today, 02:26
Joined
Sep 20, 2006
Messages
1
Hi, I want to create a customer no which will be the primary key. The problem is I want it to be of the order of: A0001234. The next entry will have the key: A0001235 and so on.
Is there a way to do this in Access alone or will I have to use a different front end and program this in Java.

Thanks to anyone who responds to this.

Don
 
If you are asking will Access generate this type of number as an autonumber the answer is no. You will have to write your own code to do this. If you are using an Access front end, you would use the DMax() function to find the highest number already assigned. I don't know what the Java or Asp equivalent would be.

NEVER store multiple attributes in a single column. Use a two field primary key. One field to hold the prefix string and a second to hold the serial number.
 

Users who are viewing this thread

Back
Top Bottom