Results 1 to 4 of 4
  1. #1
    schwabe is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Location
    San Francisco Bay Area
    Posts
    50

    Rerun a query after update

    Hello all,



    I've set up a "query by form" and now I'm having an issue that I need to press refresh all after the update.

    Some more details:
    I have set up a form with two subforms. Each subfom contains a multiple items form and on the main form I have two comboboxes to select customer and project. The subforms then give me some information just on the customer and project.

    I have set up the query by form by using a filter like [forms]![mainform].[cbocustomer] & "*" and [forms]![cboproject] &"*", respecively.

    Everything works nicely, but I have to press "refresh all", once I've changed my choice of custoemr and/or project?

    Is there an easy way to do the refresh all in VBA? I might also just refresh the two queries. (The Me.Requery does not work).

    Thanks!

  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,652
    The Requery should work, but it sounds like you'd need to requery the subforms, not the main form (or in addition to the main form).
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    schwabe is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2012
    Location
    San Francisco Bay Area
    Posts
    50

    Problem solved

    That solved the problem instead of Me I had to give the subforms...

    Thanks again!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem! It would be nice if the Me.Requery also did any child objects like a subform, but alas, not the case.
    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. Replies: 4
    Last Post: 11-10-2011, 03:41 PM
  2. Replies: 2
    Last Post: 09-21-2011, 01:30 PM
  3. Replies: 1
    Last Post: 08-19-2011, 12:16 PM
  4. Update 2 tables with one Update Query
    By Douglasrac in forum Queries
    Replies: 4
    Last Post: 04-14-2011, 08:33 AM
  5. Update Query- selective update?
    By stephenaa5 in forum Queries
    Replies: 1
    Last Post: 10-29-2009, 11:15 AM

Tags for this Thread

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