Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Developer 47 Lessons    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
When Closing Main Menu Open Forms Does Not Close
Jan Holm 
     
13 months ago
Hi,
Very interesting lessons. However, everything works fine except:

1) When pressing the "Close All" button the "Forms in collection" returns to 0 but
   all open CustomerF" forms are still open.

2) When closing the main menu, all open CustomerF" forms are still open.

NOTE: I checked it also using the After-L4.accdb provided by you, with the sam result!

/Regards Jan Holm

I tried to solve the problem adding the following code in Form_Close of the main menu in order to close any remaing open CustomerF forms, and it worked (at least for this case).

Private Sub Form_Close()
    Dim F As Form, L As Long
    
    For L = 1 To OpenForms.Count
        Set F = OpenForms(L)
        On Error Resume Next
        DoCmd.Close acForm, F.Name
    Next L

    Set OpenForms = Nothing

End Sub
Kevin Robertson  @Reply  
          
13 months ago
All you need is the one line of code that is in the Close All button.
That one line will close All instances of CustomerF opened from the Customer List when the Main Menu is closed.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Developer 47 Lessons.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 8:14:28 AM. PLT: 1s