T
therrien
I am running a routine to refresh and requery open forms after updating a
table.
The routine does this ...
Public Function RefreshOpenForms
Dim this As Form
'Find all open forms and requery & refresh them
For Each this In Application.Forms
this.Refresh
this.Requery
Next
End Function
... what happens is that at least one open form ends up closing. I don't
know why it closes. And it is not always the same form that closes.
I am refreshing all open forms because the table I am updating is the source
in a combo box on one form. I am requerying all open forms because the table
being updated is the source for a form.
I have also attempted refresh and requery using the specific form names and
again, one form ends up closing.
Any help would be greatly appreciated.
Paul
table.
The routine does this ...
Public Function RefreshOpenForms
Dim this As Form
'Find all open forms and requery & refresh them
For Each this In Application.Forms
this.Refresh
this.Requery
Next
End Function
... what happens is that at least one open form ends up closing. I don't
know why it closes. And it is not always the same form that closes.
I am refreshing all open forms because the table I am updating is the source
in a combo box on one form. I am requerying all open forms because the table
being updated is the source for a form.
I have also attempted refresh and requery using the specific form names and
again, one form ends up closing.
Any help would be greatly appreciated.
Paul