Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Index   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Splash Screen < Command Buttons | Relationships >
Back to Splash Screen    Comments List
Order of operation Upload Images   Link   Email  
Scott Axton            
3 years ago
Richard -
  I'm in the extended cut. You show:
             Open  MainMenuF
             Close CurrentForm
  I'm in habit of
             Close CurrentForm
             Open  MainMenuF

I was originally taught that way the current form doesn't interfere with any closing events or load events of the new form.

Am I all wet? or... Is this an "It depends" situation?
Richard Rost             
3 years ago
You can't put any lines of code after the Close command. Once that's issued the form shuts down. You can do it from outside the form, like in a global module, but not in a form module.
Scott Axton            
3 years ago
Hmmm...  Mine  has been working like a champ.

You can't put any lines of code after the Close command.
Agreed.  Nothing after the close other than the open form.
The close then open are right back to back and the code completes just fine (for years).  Maybe I've just been lucky.
Wouldn't surprise me that I was told wrong (or read wrong) I honestly don't remember where I learned it.  I just know it wasn't you.  Try it though.  Reverse it and it still completes and runs successfully.
Richard Rost             
3 years ago
It MIGHT work in certain situations. I just tried it with two forms. In my CustomerF, I put:

Docmd.Close (me)
Docmd.Open "ContactF"


And it did work. It shut down the CustomerF and opened ContactF, but I wouldn't rely on this to work 100% of the time. I've seen many instances where it will not run. I'd have to do more experimenting to find a specific example, but as a matter of good practice you should always open another form before closing the one you're on.
Scott Axton            
3 years ago
Thanks for indulging me.  You've been at this a whale of a lot longer than I so I will defer to your knowledge.
I wasn't saying you were wrong just that I might have been taught wrong.
Richard Rost             
3 years ago
I get it... and you weren't wrong either. It works... sometimes. And then it doesn't. :)

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Splash Screen.
 

 
 
 

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 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 7/15/2024 5:56:54 AM. PLT: 0s