Results 1 to 2 of 2
  1. #1
    fuecheefang is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Aug 2015
    Posts
    43

    Creating a search field and button on a form to search and retrieve match from multiple tables?

    Creating a search field and button on a form to search and retrieve match from multiple tables?

    I have various tables with phone circuits, and I need to create a form with a search feature if a circuit goes down or is impacted we can just type in the circuit id to see what locations are affected. The search needs to span multiple tables. Please help.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    on the button click event, run a uniion query, docmd.openquery "qnUnion"
    each query in the union will look at the form

    qnUnion =
    select * from query1
    union
    select * from query2
    union
    select * from query3


    query1=
    select * from table1 where [field1] = forms!myForm!txtBoxFind

    query2=
    select * from table2 where [field2] = forms!myForm!txtBoxFind

    etc.

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

Similar Threads

  1. Replies: 8
    Last Post: 09-02-2015, 03:00 PM
  2. Replies: 5
    Last Post: 01-24-2015, 11:49 AM
  3. Replies: 5
    Last Post: 07-13-2012, 01:15 AM
  4. Replies: 12
    Last Post: 03-22-2012, 02:48 AM
  5. Replies: 3
    Last Post: 01-14-2010, 08:32 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