By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
425,588 Members | 1,920 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 425,588 IT Pros & Developers. It's quick & easy.

Refreshing results displayed on the subform

P: 31
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.
Jul 13 '07 #1
Share this Question
Share on Google+
3 Replies


puppydogbuddy
Expert 100+
P: 1,923
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!YourSubformControl.Form.RecordSource = strSql
Jul 14 '07 #2

P: 7
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??
Jul 16 '07 #3

P: 65
If I can understand you, in the button_click event add:

<subform>.requery
Jul 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.