Refreshing Subform and the results displayed

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

    Refreshing Subform and the results displayed

    I have a subform on a main form. I want the subform to display result from a saved query "qryMain" on button click event. Now in another button click event I modify the definition of qryMain. I want the subform to refresh the results displayed to reflect the current definition of the query.

    I can do a Subform.ReQuery maybe but I am not able to do it and I think because the subform has kept the qryMain open it is not able to refresh.

    Is there a possibility that I can close the subform and open it again so that it reflects the current results. How should I work around this problem.

    Please help. Thank you.
  • mattkorguk
    New Member
    • Mar 2007
    • 28

    #2
    Hi,
    If you have the subform based on qrymain, that's what it shall display. From the second button, insead of modifying qrymain I'd be inclined to run a seperate update query and then just refresh the subform to show the new values.
    Not knowing what you're actually trying to acheive obviously makes my reply a little difficult, but that's my suggestion.
    Matt

    Comment

    Working...