What does Query_unload event do in VB? Why we need Form
_unload event?
Answers were Sorted based on User's Feedback
Answer / amirthraj
Query_Unload event is fired, when the form is actually
preparing for unload. Whereas Form_Unload is triggered when
form is unloaded. It's possible to stop the form unload
from Query_Unload event by setting its Cancel argument to
True.
Is This Answer Correct ? | 5 Yes | 0 No |
Answer / parmanand
Query unload means your form is about to close but still not
closed.
Form _unload means your form is released from the memory and
its totally closed. Hence if you want to display any message
you will keep it in Query unload , form unload will not work.
Ex.
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode
As Integer)
MsgBox "do you want to close the form ?", vbYesNo
if vbno then
Cancel = True
end if
End Sub
Is This Answer Correct ? | 2 Yes | 0 No |
Which method is preferred to save data like database to the disk?
Can any one please suggest which institute is providing Advance Excel & VBA Macros in Excel training in Hyderabad.
What are the Differenct Types of Instancing Property in ActiveX Dll and Exe?
What is the difference in passing values ByRef or ByVal to a procedure?
How would you Create a Query Builder and Explain its uses
Why API functions are Required?
Types of LockEdits in RDO.
How do I force a file dialogue box to reread the currect disk?
What is the difference between Msgbox Statement and MsgboxQ function?
I get a "file not found" error on the IIF function when I distribute by program. Why?
What is disconnected recordset?
What is a datacontrol?