I have a form with the close button and a cancel button. when the close button is clicked, i want the cmdCancel_Click event to fire. The event fires, but the form does not unload. Why?
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If Not UnloadMode = vbFormCode Then
Cancel = True
Private Sub cmdCancel_Click()