Current event firing on form closure ?

  • Thread starter Thread starter mscertified
  • Start date Start date
M

mscertified

My form has an Exit button, when clicked it is firing the Current event. I
traced the sequence to Exit button--Unload--Close--Current.
Close event is:
Private Sub Form_Close()
Me.OrderBy = vbNullString
Me.OrderByOn = False
Me.filter = vbNullString
Me.FilterOn = False
End Sub
Is anything here triggering Current? Records were previously displayed by
filtering, does 'Me.filter = vbnullstring' trigger Current?

Thanks.
 
No, but the Me.FilterOn = False line after it does.
There is no reason to reset the filter and order of the form when closing.
To be certain, rather than just
Docmd.Close
Use
Docmd.Close acForm, Me.Name, acSaveNo

acSaveNo has nothing to do with the form's data, only modification to the
form object.
 
Back
Top