Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Refresh controls in one form when I close another

Status
Not open for further replies.

slobad23

IS-IT--Management
Jun 30, 2006
90
GB
I have a form which I use to select data in a subform. It is unbound and when I select an name from here it gives me records in a subform based on that name.

I have a button in the header of this selector form which pens a form to add another name.

At the moment I am having to get the users to press a refresh button on the first form as when the "add new name" form closes it doesn't update the information in the selector combo box automatically.

I have experimented with codebuilder and used OnLoad, OnOpen and all sorts trying to get it to refresh on its own.

Could someone rovide me with a solution to this - I just need to know what event needs to be set to refresh when I close the form. Maybe I have to add something to the close button of the other form.

Help please!
 
I do not have any code on the button - when I go to the code for it, it's blank. I created it using a wizard and it has this expression behind it:

lawyer_add, Form, , , , Normal

I either need it to refresh (or requery) so the results in the combo box are updated and I am happy for it to be at any time i.e.

When I close the add new name form
When the main form gains focus (unsure of the correct term for this)
When I click on the combo box to drop it down

Thanks ,

Slobad23
 
I'm not sure what version of Access you are using. However this:
lawyer_add, Form, , , , Normal
should have an option to open as a dialog mode. There would then have a line to requery the combo box.

Duane
Hook'D on Access
MS Access MVP
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top