V
Vincent Verheul
Hello,
I work a lot with filters in my Access application. With VBA I apply filters
to forms and subforms. I think this is the major reason that my FrontEnd
bloats all the time. That's why I thought of a way to prevent Access to save
changes to the Forms.
I want to allow the user to use the normal control box to close a form
(adhere to Windows Standards). That's why I'm looking at the From_Close or
Form_Unload events to do some coding there.
A quick try-ouy as shown below doesn't work: error 2501 'The close action
was canceled'.
Private Sub Form_Unload(Cancel As Integer)
Static Recursive As Boolean
If Not Recursive Then
Recursive = True
Cancel = True
DoCmd.Close acForm, Me.Name, acSaveNo
End If
End Sub
Any ideas, comments?
TIA
I work a lot with filters in my Access application. With VBA I apply filters
to forms and subforms. I think this is the major reason that my FrontEnd
bloats all the time. That's why I thought of a way to prevent Access to save
changes to the Forms.
I want to allow the user to use the normal control box to close a form
(adhere to Windows Standards). That's why I'm looking at the From_Close or
Form_Unload events to do some coding there.
A quick try-ouy as shown below doesn't work: error 2501 'The close action
was canceled'.
Private Sub Form_Unload(Cancel As Integer)
Static Recursive As Boolean
If Not Recursive Then
Recursive = True
Cancel = True
DoCmd.Close acForm, Me.Name, acSaveNo
End If
End Sub
Any ideas, comments?
TIA