+ Reply to Thread
Results 1 to 4 of 4

Create a new Id Number field

  1. #1
    Registered User
    Join Date
    11-07-2008
    Location
    St. Louis, Missouri, USA
    MS-Off Ver
    2003
    Posts
    50

    Create a new Id Number field

    I’m a lowly novice Access user.

    I created a database of our brain tumor patients. Up till now it’s just been a standalone database. So, using the autonumber from the primary key in my demographics table as the patient Id Number has worked well up till now. However now we are planning to add another site. If we pool our data, our patient ID numbers will overlap and will no longer be unique.

    I need a way to easily distinguish my patients from patients at the other site. For example, my patient ID numbers would start with the letter “a”. Another site’s would start with the letter “b”. I don’t want to monkey with the autonumber in the primary key field because I’ve always heard that doing that can lead to problems.


    So, since Access only allows one autonumber field per table, how do create a Id number field in my demographics table that is both unique to my site, and automatically increases with each record in the database like an autonumber?

    Thanks
    Last edited by NBVC; 05-06-2011 at 03:52 PM.

  2. #2
    Forum Contributor
    Join Date
    04-23-2009
    Location
    IOWA
    MS-Off Ver
    2010 Professional
    Posts
    270

    Re: Need to create a new Id Number field

    This is what you are looking for

    About halfway down the page there is about 5 different examples.

    Hope this helps,

    Dan
    "I am not a rocket scientist, I am a nuclear engineer." - Split_atom18
    If my advice has been helpful to you, then please help me by clicking on the "Star" and adding to my reputation, Thanks!

  3. #3
    Forum Expert ConneXionLost's Avatar
    Join Date
    03-11-2009
    Location
    Victoria, Canada
    MS-Off Ver
    2010
    Posts
    2,952

    Re: Need to create a new Id Number field

    How about creating a tblSite? You'll be able to use the PK from tblSite as a foreign key in your demographics table.

    Cheers,
    Would you like to say thanks? Please click the: " Add Reputation" button, on the grey bar below the post.

  4. #4
    Registered User
    Join Date
    11-07-2008
    Location
    St. Louis, Missouri, USA
    MS-Off Ver
    2003
    Posts
    50

    Re: Create a new Id Number field

    Nope. Not going to figure this one out I'm afraid. Too far over my head. Thanks for the suggestions though.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1