Results 1 to 4 of 4
  1. #1
    jjjft is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jan 2013
    Posts
    1

    Creating a subform for a junction table with multiple combo box selections

    Hi Everyone,


    I'm hoping someone can help me with this. I have a many-to-many relationship set up using a junction table. One of my parent tables is 'Employee Information', the other parent table is 'Projects'. We have multpile employees working on multiple projects (up to 19 projects). I have created a junction table where the emlpoyee ID number and project number are set as the primary keys. They are both the primary keys in the parent tables as well. The project numbers are currently set up as a combo box in the junction table.
    What I am trying to do is create one form where I can enter all the information. So far, I have made the main form to be the employee information. I have created a subform using the junction table. I would like to be able to see which projects an individual is working on (could be up to 19). I would also like to add an individual to a project and that information be inputted in to the junction table. The issue I am incountering is that the combo boxes on the form will only let me select one project. I have tried creating multiple subforms and I have created individual combo boxes on one subform, but the same thing keeps happening. If I have say 5 combo boxes, all 5 will show whatever selection I chose in the first one.

    Does anyone know how to allow for multiple selections?

    Thank you for your help.

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,825
    Don't understand the issue. Are you using form/subform arrangement?

    If there are five projects for one individual then there should be 5 records in the junction table.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    alcapps is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    292
    so you need a form that is project driven and a form that is employee driven.

    list of projects.. list box when you select the project a sub form with your many to many table is hooked by project. all employee's would show that are assigned to that project. usually the sub form is a datasheet view of the many to many adding in the names for the employee in the sub form. In the sub form you connect the before insert add the list box project ID to the project ID field in the sub form. Do the reverse for the Employee to projects. Show a list of employees and have a sub form of projects. on before insert, add the employee id to the field.
    this should get you project to employees and employees to projects.

  4. #4
    alcapps is offline Competent Performer
    Windows XP Access 2003
    Join Date
    Jan 2012
    Posts
    292
    I did an example of project to employee and a form of employee to project. One with a list box the other with a combo box. just for an example. I hope this helps you get understand what you can do. you can add things like only show projects in the drop down that can be added. But I didn't want to make this complicated.
    Attached Files Attached Files

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 5
    Last Post: 01-15-2013, 01:27 PM
  2. Replies: 4
    Last Post: 09-17-2012, 10:36 AM
  3. Junction table in subform in Access 2007
    By BrizzoRay in forum Forms
    Replies: 1
    Last Post: 12-18-2011, 01:43 AM
  4. Replies: 11
    Last Post: 08-29-2011, 01:45 AM
  5. Replies: 2
    Last Post: 05-27-2011, 08:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums