Results 1 to 8 of 8
  1. #1
    nswhit is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    May 2013
    Posts
    5

    Requery subform from main form

    I have a text box and a combo box that are used to input criteria for a query. The text box is used to inut a value so that the query returns the top "N" records, the combo box further narrows the data. Those two controls are on a main form. On this main form, I also have a sub form whose source object is the query previously mentioned. Ultimately I'm trying trying to create a form where you input specific values into the main form controls, and the sub form populates with the data.



    I have cmd button that runs the query great, however, I would like the sub form to update as well.

    Thanks!

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    Are the main form and sub form bound to each other?

    Dale

  3. #3
    nswhit is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    May 2013
    Posts
    5
    No. I've added a button that on click runs the query and then requeries the subform, however it only requeries the subform based on my second control (ignoring the top "N" records I would like returned as well). To make it more confusing, if i open the actual query on its own, it includes all the criteria inputed in the form (exactly how I would like the sub form to appear).

  4. #4
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    You have 1 query with criteria from the main form.
    You have the same query for the sub form.
    You want the sub form to show the data filtered by the criteria from the main form.
    The forms are not bound.

    First I would try binding the forms.
    And then I would try Refresh rather than Requery.

    If this does not work upload your SQL.

    Dale

  5. #5
    nswhit is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    May 2013
    Posts
    5
    Correct. Didn't have much luck binding them. I think the problem exists trying to requery for the top "N" records. If I add a command to open report based on the query or open the actual query both display the accurate data, its just the subform that is not updating.

  6. #6
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    nswhit,
    We just stepped out of my skill level.
    I am still very much a newbie with Access and this over my head.

    Hopefully another member will step up and help you.

    Sorry I could not be of more help.

    Dale

  7. #7
    nswhit is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    May 2013
    Posts
    5
    No problem, thank you anyways. Appreciated the quick response

  8. #8
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    nswhit,
    Send out PM asking for help.
    I hate to leave you hanging.

    Dale

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

Similar Threads

  1. Requery Main Form, Keep Focus on Subform
    By burrina in forum Forms
    Replies: 8
    Last Post: 11-21-2012, 03:50 AM
  2. Replies: 1
    Last Post: 11-18-2012, 06:24 PM
  3. Requery subform after update of main form
    By gemadan96 in forum Forms
    Replies: 3
    Last Post: 10-17-2012, 02:33 PM
  4. Replies: 3
    Last Post: 04-17-2012, 10:28 AM
  5. Replies: 3
    Last Post: 10-10-2011, 06:33 PM

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