Computer Learning Zone CLZ Access Excel Word Windows

Education is a system of imposed ignorance. Teachers should be guides and facilitators, not taskmasters who impose fixed knowledge.

-Noam Chomsky
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Visitor Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Getting form name to move it
Stephen Herrera 
  
2 years ago
I made a "simple" design change and am much happier with the look of my program, but it is causing issues.

I have one "main form" that has a button menu to open other forms. When the forms are opened, I want them to move to the working area of the main form. Forms can also be opened by buttons from other forms, so I need the move to be coded into the form itself.

If I do me.move for the on load event in the form opening, it works fine. However, thinking of the future if I ever need to change the positions I don't want to have to go into every form to change it.

I tried creating a module to do this. I was going to capture the name of the opening form and use it to do the move. However, when a form is called from the button click the On Load event of the opening form has the main form as the active form when I use Screen.Activeform.Name to capture the name.

How can I get the opening forms name?
Kevin Yip  @Reply  
     
2 years ago
One way to do it is to have a form pass its own name to a custom function that opens another form.  See the picture below as an example.  When a form opens another form, run this:

     MyOpenForm Me.Name, "name of form to be opened"

The custom function will then store the name of the first form in a global variable, then open the second form.  At that point, you will have the names of both forms.
Kevin Yip  @Reply  
     
2 years ago

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

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: 5/6/2026 10:19:26 PM. PLT: 2s