I have this problem
My form has a huge listbox that contains many records. By double clicking the appropriate row (record) on that listbox, user opens that record in another separate form. The form with the listbox statys open as well.
So, user makes changes to that record, closes form, and returns to the form with the listbox. What I want to do is that the form with the listbox would get updated when the user comes back to it.
Is it possible, by closing the record-modification form, update all the open forms (because I wouldn't know the name of the form with listbox, I have so many of them from where the record modification form may be open)
I tried this on my record-modification form:
Private Sub Form_Unload(Cancel As Integer)
For Each frm In Application.Forms
frm.Requery
Next frm
End Sub
But it doesn't work
Please suggest anything else
My form has a huge listbox that contains many records. By double clicking the appropriate row (record) on that listbox, user opens that record in another separate form. The form with the listbox statys open as well.
So, user makes changes to that record, closes form, and returns to the form with the listbox. What I want to do is that the form with the listbox would get updated when the user comes back to it.
Is it possible, by closing the record-modification form, update all the open forms (because I wouldn't know the name of the form with listbox, I have so many of them from where the record modification form may be open)
I tried this on my record-modification form:
Private Sub Form_Unload(Cancel As Integer)
For Each frm In Application.Forms
frm.Requery
Next frm
End Sub
But it doesn't work
Please suggest anything else