Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    11

    Talking Unanswered: Using primary keys from two tables

    I need to update attendance for a group. This group comprises of two different entities the patients and the clietns , each are held in seperate tables with different atuonumber primary keys. However, both entities can attend the same group my problem is how to approach attendance problem? I want to do this in one form for simplicity
    If I merge both group into attendance table I will cause duplication of primary keys,
    one possible solution is to append a letter onto the autonumber of one of the groups, is this possible. Do you know any other possible solutions? thanks for your help

  2. #2
    Join Date
    Dec 2003
    Location
    Toronto, Ont. Canada
    Posts
    238

    Re: Using primary keys from two tables

    Originally posted by hoggy
    I need to update attendance for a group. This group comprises of two different entities the patients and the clietns , each are held in seperate tables with different atuonumber primary keys. However, both entities can attend the same group my problem is how to approach attendance problem? I want to do this in one form for simplicity
    If I merge both group into attendance table I will cause duplication of primary keys,
    one possible solution is to append a letter onto the autonumber of one of the groups, is this possible. Do you know any other possible solutions? thanks for your help
    Well my first thought is that your Attendance table should have it's own primary key... the Patient or Client ID's should only be secondary keys...

    However... another way to try get around it is to change the autonumber fields to Random instead of Increment... I read somewhere (I should have saved that link! lol) the actual probability of two random autonumbers ending up the same and it was 1 in a few million or something like that....

    HTH

Posting Permissions

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