|
-
Sep 13th, 2000, 09:05 AM
#1
I've tried unloading all forms in my app, but I'm hanging up when I exit my app. My app has a number of forms that allow the user to go 'back' or 'next'. I show a form, then hide the current form when they click on 'back' or 'next'. After the current form is hidden I show the new form and keep doing this until all forms have been displayed and 'next' is clicked one last time. My app exits fine if the user never clicks 'back'.
I use query unload to verify an exit from the user. If accepted, I call a procedure to unload all forms.
Dim Frm As Form
For Each Frm In Forms
Unload Frm
Set Frm = Nothing
Next Frm
End
I have noticed that if a form is displayed more than once it runs the query unload more than once. I don't know why, because I'm only making the form invisible, then visible again, so there shouldn't be more than one instance of it, right?
Thanks in advance for your replies.
-
Sep 13th, 2000, 09:21 AM
#2
Addicted Member
In your form load for each form use this code to only have one instance for each form
private sub form_load
if app.previnstance = true then
end
end if
Hope this helps because now your forms should only show up one time even if the user tries to open the same form again.
-
Sep 13th, 2000, 09:25 AM
#3
Frenzied Member
Use Unload Me instead of end. It will Unload the form from the memory, closes open files and all sort of things to properly quit your prog.
Jop - validweb.nl
Alcohol doesn't solve any problems, but then again, neither does milk.
-
Sep 13th, 2000, 12:40 PM
#4
Form load is only running once, but form activate runs every time I make a form visible. I am using vbmodal forms.
I am trying to end my program with using only unloads, but I'm still locking up on exit.
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
|