Results 1 to 1 of 1
  1. #1
    Join Date
    Nov 2004
    Posts
    78

    Unanswered: Filter a union query

    I would like to search about 10 tables that matches one or multiple selections on the search form

    The from has 7 search fields.
    The results should be AND not OR
    For an example
    If field A = 1234 then return all records that field A =1234
    If fields A = 1234 and fields B = abcd then return all records that fields A = 1234 and fields B = abcd

    All tables are sub tables to an other table (To see this in details, open the Query qFindCemaAssignmentBPI)

    When returning the results I would also like to have some information of the parents’ tables.

    I already prepared a joint query for each table to include the parents’ information

    Then I created a Union query to combine all queries.

    Then I have a query that filters the union query based on the information selected on the form.

    I’m attaching a sample DB

    The way I prepared it is very long and might also be wrong.

    So, can anyone please take a look and share your opinion on how to design this filter??

    This sample doesn’t have all tables, but the other tables are basically the same.
    However, if this way is wrong, why waste time to enter all other tables?

    I appreciate your help.

    Thanks
    Joe
    Attached Files Attached Files

Posting Permissions

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