Current event firing on form closure ?

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.
 
K

Klatuu

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top