|
-
Jan 29th, 2003, 01:57 AM
#1
Thread Starter
Addicted Member
Query Unload
Hi all,
I have the following code in the QueryUnload procedure of a form:
Private Sub Form_QueryUnload(Cancel As Integer, UnloadMode As Integer)
If UnloadMode = vbFormControlMenu then
CleanUp 'procedure to unload all forms & clean up db connections
Unload Me
Set Form1 = Nothing
End If
End Sub
In CleanUp the code is:
Public Sub CleanUp()
Dim FormX As Form
For Each FormX In Forms
Unload FormX
Set FormX = Nothing
Next FormX
'additional code to clean up the db connections
End Sub
My question is, are the last 2 lines in the Query Unload procdure ie.
Unload Me
Set Form1 = nothing
neccessary since the CleanUp procedure unloads all forms and set them to nothing ?
I read somewhere that it was and just wanted to confirm if it was true.
Cheers
Jack
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|