Results 1 to 3 of 3
  1. #1
    New Lounger
    Join Date
    Jun 2003
    Location
    Camp Lejeune, North Carolina, USA
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Editing the primary key (Access 2003 SP2)

    Subject edited by HansV to make it more descriptive than "Access"

    I have an Access Database at work which we use to keep Department of Navy updated on the Substance Abuse among the troops. I have chosen as a Primary Key for the Patient Information table the UID - which is the service members SS# with what member family number is being treated. example: 20/123-45-6789. All patients seen in clinic have a SCRID number which follows them through every level of treatment. The SCRID number changes when they come in for additional screenings through their career, the UID number never changes.

    I took an advance Access Class at a University in Raleigh and came back and used Enforced Integerity with all tables and cascade updating records. Before the class I only had enforced Integerity.

    Because of the importance of the UID staff had been told up till this point not to make any changes to the UID even if the SS# had a typographical error. After allowing cascading updates some of the staff have realized they do not have to contact me to make changes to the UID because all the records are corrected when they themselves change the UID.

    Can the Primary Key have a Visual Basic code which would allow them to input new patient information when creating a new record, but not changing the SS# themselves on an older record with an error in the SS#. It has worked out very well with just myself making any changes to the data within the database when related to UID.

    The Command does not have a problem with the staff changing spelling to names, or birthdates, but they prefer that regular staff using the database cannot change the Primary Key data once entered. Management is the preferred choice for making changes.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Editing the primary key (Access 2003 SP2)

    I always use an AutoNumber field as primary key. Since you cannot change it, it is the ideal way to identify a record uniquely and to link tables - you only need to enforce referential integrity, there is no need to cascade updates.

    It's not clear to me what you're asking, or even whether you're asking anything at all. Could you try again?

  3. #3
    New Lounger
    Join Date
    Jun 2003
    Location
    Camp Lejeune, North Carolina, USA
    Posts
    18
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Editing the primary key (Access 2003 SP2)

    Thank you for responding, I did solve the problem by not cascading up. I have used Autonumber for another tables within the database, but felt the Social Security Number would work better for the Command because it is a unique identifier.

    Back to work, Thank you again

Posting Permissions

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