Everytime the below code runs, it filters the first record (1 of 1). I removed all filters from the form and so on. When I close form 2, I want form 1 to show the changes, and I want to return the record I was on.
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo ErrorHandler
If CurrentProject.AllForms("fmainCompany").IsLoaded Then
Forms!fmainCompany.Requery
End If
CleanUpAndExit:
Exit Sub
ErrorHandler:
Call MsgBox("An error was encountered" & vbCrLf & vbCrLf & _
"Description: " & Err.Description & vbCrLf & _
"Error Number: " & Err.Number, vbCritical, gstrAppTitle)
Resume CleanUpAndExit
End Sub
What could be the problem?
Private Sub Form_Unload(Cancel As Integer)
On Error GoTo ErrorHandler
If CurrentProject.AllForms("fmainCompany").IsLoaded Then
Forms!fmainCompany.Requery
End If
CleanUpAndExit:
Exit Sub
ErrorHandler:
Call MsgBox("An error was encountered" & vbCrLf & vbCrLf & _
"Description: " & Err.Description & vbCrLf & _
"Error Number: " & Err.Number, vbCritical, gstrAppTitle)
Resume CleanUpAndExit
End Sub
What could be the problem?