![]() |
VB If Statement Help
I just want to make these statements so that when the if is true, the message box is shown and the form is not closed. If the required fields are blank, then the form should not close, but it is closing after you click the message box. Can anybody help me with this?
Quote:
|
A quick google for "vb onclose event" leads me to think you can just put in
that setting e.Cancel to True cancels the close. |
one thing I'd suggest, not that you have to is instead of Me.edit_type.Text = "" I would use Me.edit_type.Text = nothing. To me that just seems better, don't know how others would feel. Either way works fine, I just see "Nothing" neater than ""
|
Quote:
Quote:
|
its better write this code into Form.Closing routine
|
Quote:
|
| All times are GMT -5. The time now is 7:38 PM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC