G
Guest
I've got a form called frmCriteria that generates SQL to restrict the records
that are displayed on frmForecast. When I change the criteria in
frmCriteria, I would like to have frmForecast immediately reflect the change
- without having to open and close frmForecast.
I entered this into the AfterUpdate event in frmCriteria:
Sub Form_AfterUpdate()
' Update frmForecast if it is open
If IsOpen("frmForecast") Then
Forms!frmForecast.Refresh
Forms!frmForecast.Requery
End If
End Sub
When I compile, I get a compile error - sub or function not defined. I'm no
VBA expert - I copied the code from a book, so I really don't know what's
wrong with it. Any ideas?
that are displayed on frmForecast. When I change the criteria in
frmCriteria, I would like to have frmForecast immediately reflect the change
- without having to open and close frmForecast.
I entered this into the AfterUpdate event in frmCriteria:
Sub Form_AfterUpdate()
' Update frmForecast if it is open
If IsOpen("frmForecast") Then
Forms!frmForecast.Refresh
Forms!frmForecast.Requery
End If
End Sub
When I compile, I get a compile error - sub or function not defined. I'm no
VBA expert - I copied the code from a book, so I really don't know what's
wrong with it. Any ideas?