If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
create an Auto-increment field for use as the primary index betwee
I'm considering converting an older, yet extremely useful, database from
Alpha4-Version 6 to MS ACCESS. In the old databse, I have a primary field used to tie the individual tables together in the database that "auto-increment" when new records are added -- EX: if "CA-1234" is the primary key in the last record in the table, when I go to enter a new record in the table, the application creates the primary index field with "CA_1235" automatically. I'm a novice to MS ACCESS and can't seem to find how to get this to happen in MS ACCESS. Does this "Auto-Increment" feature exist in MS ACCESS? If so, how to I make it happen? All I can find in MS ACCESS is an "Auto-Number" feature. -- HJT |
#2
|
|||
|
|||
create an Auto-increment field for use as the primary index betwee
Autonumber is the equivalent function in Access. However, you do not have
control of the format or value of an autonumber field in Access. It can also develop "gaps" if a record is created, yet never saved. This is by design. You do not need a real-world value to maintain referential integrity between records in related tables. Using a made-up, system-created value avoids complications down the road when naming conventions change. If you still want an incremented value for the user, to see, however, you can create one with the DCount function in a form. On my website (www.rogersaccesslibrary.com), is a small Access database sample called "AutonumberProblem.mdb" which illustrates how to do this. You can find it he http://www.rogersaccesslibrary.com/f...ts.asp?TID=395. -- --Roger Carlson MS Access MVP Access Database Samples: www.rogersaccesslibrary.com Want answers to your Access questions in your Email? Free subscription: http://peach.ease.lsoft.com/scripts/...UBED1=ACCESS-L "HJT" wrote in message ... I'm considering converting an older, yet extremely useful, database from Alpha4-Version 6 to MS ACCESS. In the old databse, I have a primary field used to tie the individual tables together in the database that "auto-increment" when new records are added -- EX: if "CA-1234" is the primary key in the last record in the table, when I go to enter a new record in the table, the application creates the primary index field with "CA_1235" automatically. I'm a novice to MS ACCESS and can't seem to find how to get this to happen in MS ACCESS. Does this "Auto-Increment" feature exist in MS ACCESS? If so, how to I make it happen? All I can find in MS ACCESS is an "Auto-Number" feature. -- HJT |
Thread Tools | |
Display Modes | |
|
|