Refreshing results displayed on the subform

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Flo100
    New Member
    • Jun 2007
    • 31

    Refreshing results displayed on the subform

    I have a subform that i created in a main form, which I am using to display results of a query. There are different controls on the main form that make a query. The subform, so has to display the related results. There is a button click event in which I am making the query. I donno how to refresh the subform so that it reflects the results of modified query.

    Please help. Thank you.
  • puppydogbuddy
    Recognized Expert Top Contributor
    • May 2007
    • 1923

    #2
    Originally posted by Flo100
    I have a subform that i created in a main form, which I am using to display results of a query. There are different controls on the main form that make a query. The subform, so has to display the related results. There is a button click event in which I am making the query. I donno how to refresh the subform so that it reflects the results of modified query.

    Please help. Thank you.
    If I understand you correctly (you did not provide your code):

    in your button click event: after your sql string is created, you need to assign it to the record source of your subform as follows:

    Me!YourSubformC ontrol.Form.Rec ordSource = strSql

    Comment

    • ajetrumpet
      New Member
      • Jul 2007
      • 7

      #3
      Maybe you could try "Me.[subformname].Requery" on one of the subform's property events??
      Or maybe "[Forms]![subformname].Requery" on the main form property events??

      Comment

      • abolos
        New Member
        • Apr 2007
        • 65

        #4
        If I can understand you, in the button_click event add:

        <subform>.reque ry

        Comment

        Working...