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

Refresh form

P: 24
Hi Guys,

I need for one of my form to refresh after a selection is made from a combo box. On my main table I have a status field which the default value is set to ‘No’. Once the selection is made from the combo box the status of the account is changed to ‘Y’. I have an update query which updates the status once the selection is made. The main source for the form is a query, in the query I have the criteria to only display ‘No’ for the status. After the selection is made I need the form to refresh. Currently I have to close the form and then reopen, then the account is no loner displayed.
I tried to use the ‘Docmd.Requery’ to refresh the form but it did not work. Could someone please help me out, thanks for any help.
Dec 27 '06 #1
Share this Question
Share on Google+
5 Replies


100+
P: 1,646
Hi Guys,

I need for one of my form to refresh after a selection is made from a combo box. On my main table I have a status field which the default value is set to ‘No’. Once the selection is made from the combo box the status of the account is changed to ‘Y’. I have an update query which updates the status once the selection is made. The main source for the form is a query, in the query I have the criteria to only display ‘No’ for the status. After the selection is made I need the form to refresh. Currently I have to close the form and then reopen, then the account is no loner displayed.
I tried to use the ‘Docmd.Requery’ to refresh the form but it did not work. Could someone please help me out, thanks for any help.
Hi. Have you tried formname.Requery
Dec 27 '06 #2

nico5038
Expert 2.5K+
P: 3,072
Try in your code:
Me.RecordSource = Me.RecordSource

Looks odd, but requeries the form 100% sure :-)

Nic;o)
Dec 27 '06 #3

P: 24
HI guys,

Thanks for all your help, it worked perfectly.
Dec 27 '06 #4

100+
P: 1,646
HI guys,

Thanks for all your help, it worked perfectly.
You are very welcome
Dec 27 '06 #5

NeoPa
Expert Mod 15k+
P: 31,494
I would use
Expand|Select|Wrap|Line Numbers
  1. Me.Requery
As Nico says the other, though it works perfectly, is not as clear for someone reading your code.
Dec 30 '06 #6

Post your reply

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