Results 1 to 5 of 5
  1. #1
    agh5147 is offline Novice
    Windows XP Access 2013 64bit
    Join Date
    Jun 2017
    Posts
    12

    SQL command in a search form.

    Hello,



    In Access 2013, I am trying to get multiple tables, specifically tbl alpha, tbl bravo, and tbl Charlie to be joined under one field. For example, I have a search for with these fields( empid, first name, last name, team name training name). This search form is to allow a employees manager to go into the database search an employee by first name, last name, empid , or even training, and return back the all information on the employee. I have been able to search by empid, team name, first name and last name, but I cant seem to get the trainings to work. I want one field in the search form to pull back from all the teams to see what trainings that employee on that specific team completed. I cant seem to get this to work. In the query design for the search form I didn't know if it was possible to put all three teams in on column field instead of having a field for alpha, bravo, and Charlie.

    Things to note-
    1. The employee Id is a combo of number and letters
    2. each employee is only assigned to a single team.
    3. Teams may have different trainings from one another.

    I don't know if this problem can be fixed without going in and changing the sql statements or if there is a way to combine the 3 different teams in one field.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Those are your real table names? You have 3 teams and each has its own table? Should be one table with another field for teamID.
    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
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    He posted on another thread and about 3 people pointed out the structure needed to be changed

  4. #4
    agh5147 is offline Novice
    Windows XP Access 2013 64bit
    Join Date
    Jun 2017
    Posts
    12
    June 7 I am not understanding could you elaborate

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    So this is essentially a duplicate of https://www.accessforums.net/showthread.php?t=66631. If you don't restructure db to have one table of data for all teams, then use a UNION query to emulate the same and then use the UNION query in other queries just as you would a table, except cannot edit data via the UNION.

    Apply basic relational database normalization concept.
    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. Replies: 1
    Last Post: 05-06-2015, 01:23 PM
  2. Replies: 3
    Last Post: 03-29-2015, 07:42 PM
  3. Replies: 11
    Last Post: 02-22-2015, 01:25 PM
  4. Little help with search command
    By daniel.ru92 in forum Programming
    Replies: 1
    Last Post: 03-07-2013, 09:44 AM
  5. Search Command
    By djclntn in forum Reports
    Replies: 3
    Last Post: 01-05-2013, 09:09 PM

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