A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

create an Auto-increment field for use as the primary index betwee



 
 
Thread Tools Display Modes
  #1  
Old March 18th, 2009, 04:41 PM posted to microsoft.public.access.tablesdbdesign
HJT
external usenet poster
 
Posts: 1
Default 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  
Old March 18th, 2009, 05:34 PM posted to microsoft.public.access.tablesdbdesign
Roger Carlson
external usenet poster
 
Posts: 824
Default 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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:07 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.