Results 1 to 2 of 2
  1. #1
    Join Date
    Aug 2008
    Posts
    27

    Unanswered: Drop down list refers to another table

    Hi everyone.
    Basically, my db has one tbl for "Clients" and one tbl for "Doctors".

    Each Client can only have one Doctor, and a Doctor can have many clients.

    The doctor tbl has a primary key field name DRID which is the Foreign Key in the Client tbl.

    I have a form where the user can enter the client details. I want the user to be able to select a doctor already in the system by clicking on the drop down list and selecting it from there. If the doctor isn't on the list, I want a button to create a new doctor.

    I've tried doing this using a subform on the main frm - but can't seem to get things to work quite properly.

    Any help would be much appreciated.

    Cheers

  2. #2
    Join Date
    Nov 2007
    Location
    Adelaide, South Australia
    Posts
    4,049
    Each Client can only have one Doctor, and a Doctor can have many clients.
    Are you sure about that? I would have thought that a client (patient) would be able to see many different doctors over time.

    I want the user to be able to select a doctor already in the system by clicking on the drop down list and selecting it from there.
    You only need to place a combo box for your DoctorID on your Client form to accomplish that.

    If the doctor isn't on the list, I want a button to create a new doctor.
    You would need a Doctor Form and a command button that opens it placed on your Client form.
    Owner and Manager of
    CypherBYTE, Microsoft Access Development Specialists.
    Microsoft Access MCP.
    And all around nice guy!


    "Heck it's something understood by accountants ... so it can't be 'that' difficult..." -- Healdem
    "...teach a man to code and he'll be frustrated for life! " -- georgev

Posting Permissions

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