473,463 Members | 1,515 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Refresh form

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
5 2982
willakawill
1,646 1GB
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
3,080 Expert 2GB
Try in your code:
Me.RecordSource = Me.RecordSource

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

Nic;o)
Dec 27 '06 #3
Umoja
24
HI guys,

Thanks for all your help, it worked perfectly.
Dec 27 '06 #4
willakawill
1,646 1GB
HI guys,

Thanks for all your help, it worked perfectly.
You are very welcome
Dec 27 '06 #5
NeoPa
32,556 Expert Mod 16PB
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

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

Similar topics

2
by: John Baker | last post by:
Hi: I have a Pop Up form that involves a main form and sub form. The sub form has the results of a query on the main form. I need to automatically perform exactly he same action that takes...
5
by: Andrew Chanter | last post by:
I have a situation where I am using an unbound dialog form to update data in an Access 2002 split back end / front end scenario. The data update is done via an ADO call (direct to the back end...
2
by: S. van Beek | last post by:
Dear reader, I have a strange situation. In a Form with a list box to search for a record in the form it self. The field in the list box is also available in the form. On an other...
2
by: Peter Oliphant | last post by:
I now have graphics being drawn in the Paint event of my form (yeah, and it's very cool). Problem was that it only updated any changes to these graphics when Paint was called. So, I then made it...
10
by: tasmisr | last post by:
This is an old problem,, but I never had it so bad like this before,, the events are refiring when clicking the Browser refresh button. In the Submit button in my webform, I capture the server side...
6
by: scott | last post by:
I guess this is a simple one but I can't seem to get it to work. I want to refresh an open form "onClose" of another. I have a Close button on a form which has User Details on it. If I update...
2
by: Robert | last post by:
I am trying to give the user dynamic search capabilities to select almost any record in the database from criteria they select. Everything seems to work except when I open the display form to...
12
by: martin1 | last post by:
All, is there window form refresh property? I try to set up window form refresh per minute. Thanks
5
by: tshad | last post by:
I have an interface I am using to get access to some of the objects on my form: a textbox (Status) and my statusbar (StatusBar). In my class, which is actually in another class from my form I have...
5
by: BlackBox | last post by:
I have a Listbox1 in the main form and I can add listbox1 items in the parent form. But when I close the parent form Listbox1 in the main form does not get refresh. I need to re-open the app. ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.