Results 1 to 2 of 2
  1. #1
    trb5016 is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Dec 2009
    Location
    Pennsylvania
    Posts
    71

    I have a union query running on an OnChange Event - Bad Idea?

    Hey Guys, I'd like your opinions.

    I have a multi user (~5 simultaneous) access front end/SQL backend (each user has local copy)

    For one search I have a Union query running as the user types. This is bringing some slight lag as the query refreshes from a user typing. (unlike similar search forms that use a simpler query)

    It's not a big deal, but do you think this could cause some strain issues with the DB?

    Query below:
    Code:
        SQL = "SELECT Phone.ID_Phone, [Room Dropdown].Room, Phone.txt_Telephone " & _
              "FROM Phone INNER JOIN (Room_Jacks INNER JOIN [Room Dropdown] ON Room_Jacks.ID_Room = [Room Dropdown].ID_Room) ON Phone.txt_Jack = Room_Jacks.[txt_Jack Number] " & _
              "WHERE Room Like '*" & RoomName & "*' " & _
              "UNION ALL " & _
              "SELECT Satellites.ID_Phone, [Room Dropdown].Room, Phone.txt_Telephone " & _
              "FROM (Satellites INNER JOIN [Room Dropdown] ON Satellites.ID_Room = [Room Dropdown].ID_Room) INNER JOIN Phone ON Satellites.ID_Phone = Phone.ID_Phone " & _
              "WHERE Room Like '*" & RoomName & "*'" & _
              "ORDER BY 2"


  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    It will obviously cause some load, but if that's what the situation requires, then go for it. If the circumstances warrant it, you could test for the length of the input text and not set the SQL until it was at least x characters.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Union Query (choosing between two fields)
    By naveehgreen in forum Programming
    Replies: 1
    Last Post: 06-17-2010, 03:24 PM
  2. union query with a calculated field
    By grad2009 in forum Queries
    Replies: 9
    Last Post: 03-31-2010, 04:50 PM
  3. Need help with a Union Query
    By jdowdy in forum Access
    Replies: 1
    Last Post: 10-13-2009, 05:24 PM
  4. Create table out of union query
    By DKruse1969 in forum Queries
    Replies: 2
    Last Post: 08-28-2009, 09:55 AM
  5. Need help with 'note book' idea.
    By Luk3y in forum Access
    Replies: 0
    Last Post: 06-26-2009, 09:54 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