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 John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to activate a refresh of a list on form1 by closing form2? 2

Status
Not open for further replies.

marcello62

Technical User
Jun 19, 2006
42
NL
Hi there,

I have a form (form1) with a list. From this form, I open another one (form2)in which I can change some settings. Form2 allows me to change some settings. After doing so, I can close form2, and I return to the underlying form1. The list on form 1 get's it's data from the settings which can be changed by form2. What I want is that the list automatically refreshes after form2 has been closed, because new settings most of the time result in a new datasource. Does anyone know how to do this? I don't know how to trigger the refreshing from the closing event of form2.

Any help will be greatly appreciated.

thanks.
 
Try
Forms!FormName1!ListBoxName.Requery

OnClose event of the second form

________________________________________________________
Zameer Abdulla
Help to find Missing people
Sharp acids corrode their own containers.
 
or in the [blue]UnLoad[/blue] event of [blue]Form2[/blue]:
Code:
[blue]Forms!FormName1!ListBoxName.RowSource = Forms!FormName1!ListBoxName.RowSource[/blue]


Calvin.gif
See Ya! . . . . . .
 
Hi zmrAbdullah, TheAceman1,

Due to circumstances I could not respond earlier, I'm sorry. Eventually, your tips absolutely got me on the right track, independently from each other they did not work, but what I had to to was to redefine in the closing event of form 2 the sql string which was the rowsource for the listbox on form 1, and than followed by a requery of the listbox on form 1. I could not believe my eyes when I saw it working!

So, thank you both!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top