Results 1 to 2 of 2
  1. #1
    Join Date
    Jun 2002
    Posts
    14

    Unanswered: Combo Box in a form which alters a junction table

    Hello

    I thought I had this problem licked. Nevertheless, as noted in a previous post, I have a db with tables for Faculty Members, Expertises, and a junction table between the two which is comprised of a FacultyID and ExpertiseID column which relate to the same columns in Faculty Members and Expertises. Thus, faculty members may be listed by a specific expertise or all of a faculty member's expertises may be listed.

    To facilitate data input, I am attempting to create a form which displays a Faculty Members record with a subform listing their expertises in a datasheet. This subform needs to have new entries put in it via a combo box which contains all of the expertises. Thus, the user can select an expertise from the dropdown and create an entry in the junction table correlating a FacultyID with an ExpertiseID.

    I have created such a table which allows me to put new entries into the junction table via the coded ID numbers (i.e., I can type 7 in the datasheet under expertiseID in the record for the Faculty Member whose FacultyID is 4 and an entry in the junction table for 4, 7 is created. However, I cannot get a combo box, where the user selects the Expertise by name (Chemistry of Wood instead of 7, for example) and have it update the junction table with 4, 7, to work. How can I accomplish this?

    Let me know if any additional illustration is necessary.

    Thx

    ~AbM

  2. #2
    Join Date
    Feb 2002
    Posts
    403
    So I take it from your post you have a table like:

    ID Expertise
    1 Biology
    2 Chemistry

    The simplest way to create a combo box that shows Biology instead of 1 is to use the combo box wizard. It is pretty self explanatory.

    When you have created the new combo - box with the wizard, set its data source to the field you want in your main table.

    The 1st column in the combo box is the one that holds the
    iD, therefore the reference to your combo - box is something like:

    Me.cbo.column(0)

    HTH
















    Last edited by dynamictiger; 06-27-02 at 08:31.

Posting Permissions

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