when i create a 'Close Form' button using the Button Wizard it generated a bunch of code that I have pasted for reference:
-------------------------------------------------------
Option Compare Database
Private Sub Command14_Click()
On Error GoTo Err_Command14_Click
DoCmd.Close
Exit_Command14_Click:
Exit Sub
Err_Command14_Click:
MsgBox Err.Description
Resume Exit_Command14_Click
End Sub
----------------------------------------------------------
above.
According to the Help documentation wrt the 'Close' method of the DoCmd, 'acSavePrompt' when the 'acSavePrompt' argument is left blank is the 'default'.
Well, as you can see in the above, it is left blank, yet there's no prompting when the button is clicked. The behavior I get when I click the 'Close Form' button is that my work is saved and the form closes.
Am I missing something? Can someone help explain?
-------------------------------------------------------
Option Compare Database
Private Sub Command14_Click()
On Error GoTo Err_Command14_Click
DoCmd.Close
Exit_Command14_Click:
Exit Sub
Err_Command14_Click:
MsgBox Err.Description
Resume Exit_Command14_Click
End Sub
----------------------------------------------------------
above.
According to the Help documentation wrt the 'Close' method of the DoCmd, 'acSavePrompt' when the 'acSavePrompt' argument is left blank is the 'default'.
Well, as you can see in the above, it is left blank, yet there's no prompting when the button is clicked. The behavior I get when I click the 'Close Form' button is that my work is saved and the form closes.
Am I missing something? Can someone help explain?