Primary Key Problem

Gilrucht

Registered User.
Local time
Today, 16:48
Joined
Jun 5, 2005
Messages
132
We use our "RealWorld" client file number as the PK for our client table.(year plus number-ie 200501,200502,etc.) I reset the Access autonumber to automatically return this number. Miles gave me a line of code months ago that "dirtys then clears a field when I open my form so that the user "sees" the new client number when he/she first opens a new form . I have searched and can't find that line of code. Can anyone help me?
 
Pat,
My apologies. Poor choice of words on my part. I know that the user has to type in the form. Miles gave me a line of code that did this for me. It put the name"John" in the first_name field then immediately erased it when the form was first opened. Thats what I am looking for. I understand this may not be be the most ideal way to do it but I really have little choice. All client activity in the firm is tracked by their client file number-ie-all correspondendence references "our file #200501"; client expenses such as postage, copying, etc are tracked by this number. Thus, it really is necessary to track clients by this number.
I'm awar of the 2006 issue. All I did was duplicate my table, rename it and change the autonumber field to a standard number fiel. Then I entered a dummy record in the duplicate table using the client id number 200501. I then created a append query and appended that record to my clientid table. When 2006 comes all I have to do is repeat this process and append an record with the number 200601. I don't understand why I have a limit of 99 rows. If all I did was to reset the counter to begin with the number 200501, when the counter reaches 200599 why won't it continue with 2005100,2005101, etc?
 
I don't understand why I have a limit of 99 rows

You don't have a limit.
Apparently Pat misunderstood and figured you would be using a fixed 6 digit format.

RV
 

Users who are viewing this thread

Back
Top Bottom