That little X button at the top right corner off your form... let's disable it.
[color green]
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If Cancel <> 1 Then
Cancel = -1
End If
End Sub
[/color]
Note: this won't make it disappear, but it will make it disabled.
Any code that is run through an Exit button can't be skipped by the user pressing the QueryUnload button. You must include another means of exiting the form if you choose to use this.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.