Results 1 to 2 of 2
  1. #1
    maggiemago3 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    10

    Append query using two unrelated tables

    I have a database with a "Category_Name" Table and an "Employee" table.



    I need the capability to assign Category Names to Employees and append them into 1 separate table. Each employee has to have the capability to appear in more then one category, thus appearing in the final table several times.

    I have a form where the end user can select a "Category_Name" using a combo box. Beneath the combo box I have a sub form which lists the employees, where the end user can filter to the employees they wish, using any of the available employee info fields (i.e. use the filter to select 1 employee based on name, or use a filter to select several employees based on location).

    I am looking to create code that will take the select "Category_Name" from the combo box and all employees that are showing in the filter in the subform and append the category name and employee id to a new table.

    I'm a novice so please don't ask why I'd be using vba if there is a more appropriate alternative please just suggest it. The employee information comes from spreadsheets from outside sources that are imported and merged into a master table in this database. this is a second step to an existing process. my constant that cannot be changes is the employee info table. the category name table is one in which i've designed an end user form, where they can create their own category names which would ultimately be used to assign categories to employees as described in my wish list above.

    as stated, I'm a super novice and need all the help I can get.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,628
    This is many-to-many relationships. Requires a junction table to relate entities. The junction table will have at least two fields - EmpID, CatID - as foreign keys.

    Use a form/subform for data entry. Options:

    1. main form bound to table Category_Name and subform bound to junction table, combobox in subform to select employee

    2. main form bound to table Employee and subform bound to junction table, combobox in subform to select category
    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.

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

Similar Threads

  1. two unrelated tables and parameter query
    By Seito in forum Queries
    Replies: 2
    Last Post: 09-12-2011, 03:01 PM
  2. Combining results from unrelated tables
    By jwreding in forum Queries
    Replies: 7
    Last Post: 08-12-2011, 01:19 PM
  3. Combine two unrelated tables with the same fields
    By lghovden06 in forum Queries
    Replies: 4
    Last Post: 07-27-2010, 03:36 PM
  4. Replies: 27
    Last Post: 10-17-2009, 10:58 AM
  5. Replies: 1
    Last Post: 07-07-2009, 01:00 PM

Tags for this Thread

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