Results 1 to 4 of 4
  1. #1
    chris.williams is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    94

    Forms with external queries taking a long time to display


    I have a form with a search field which performs a lookup on a query to a MySQL DB.

    The problem I am having is that each time I load the form (it has other functions as well), it is taking a long time to load as I am assuming it is running the query.

    How do I only run the query when I have a need to and not every time the form loads?

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    This sort of impossible to tell you. When you open the linked SQL table itself, does it open quickly or slowly?

    If you were to run a query (the same query on your form) without opening your form does it run quickly or slowly?

    If your form has list boxes or combo boxes that involve querying the SQL tables it is flat out going to take time depending on how large the source tables are. if they are all short tables and it's taking 3 minutes to open there's likely something wrong in the code for the on load or in the objects themselves.

  3. #3
    chris.williams is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2011
    Posts
    94
    The remote DB is over a variable speed line and connectivity can be great or not.

    The form has a subform which is hidden when the form is first displayed. Then a query is run and then the subform is displayed. The query is run based on text entered into a search field. With the search field blank, the query returns all records (but again the subform is hidden).

    What I would like to do is have the query run only on click command, rather than populating when the primary form is run. I suppose I could open a new window, but then that would take away the look and feel.

  4. #4
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    without an example of what you're talking about I don't think I can offer much help. You can create a sample database but instead of having the linked tables make them local tables and put in some fake data to play with then zip up a copy of it and load it here.

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

Similar Threads

  1. Image display in reports from external file
    By lumoco in forum Reports
    Replies: 2
    Last Post: 09-28-2011, 04:37 PM
  2. Replies: 2
    Last Post: 09-10-2011, 11:03 PM
  3. Replies: 3
    Last Post: 12-23-2010, 10:23 AM
  4. Replies: 2
    Last Post: 10-09-2009, 07:34 AM
  5. ODBC and Long Query Time
    By pdouglas in forum Access
    Replies: 0
    Last Post: 07-09-2009, 10:21 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