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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
Labels with click event
Brent Davis 
     
3 years ago
I have six labels which when clicked open up the subform for that labels form. I have one issue.  The issue occurs with my contacts form.  If I make a change on the contact form and then click on the call info label the contact info subform still displays. If I click on any of the other labels those forms pull up correctly.  Only trouble with the call info still showing the contact form info.  If I click on another field in the main form and click the call info label it works perfectly.  It only happens if I edit the contact form and only with the call info form. Any ideas? Thanks for the assistance.
Richard Rost  @Reply  
           
3 years ago
It would help if we could see some screen shots
Brent Davis OP  @Reply  
     
3 years ago

Brent Davis OP  @Reply  
     
3 years ago

Brent Davis OP  @Reply  
     
3 years ago

Brent Davis OP  @Reply  
     
3 years ago
the first image is the contact form when the contact label is selected.  I made a change to the contact form and then clicked the call info label. The second image is after i clicked the call info label and the contact info is still displaying.  The other images are the code.  This only happens with these two labels and only with the contact info.  All others work properly.
Kevin Robertson  @Reply  
          
3 years ago
How about just changing the Source Object of the Subform instead of trying to change the visibility of the forms.

SubformObject.SourceObject = "FormName"
Brent Davis OP  @Reply  
     
3 years ago
Thanks Kevin but I could not get that to work. Any other ideas?
Kevin Yip  @Reply  
     
3 years ago
Hi Brent, you cannot hide a form or a control that has the focus.  Doing so will cause a runtime error.  Since you use "On Error Resume Next" in your code, you don't see the error.  You need to move the focus away from the form you want to hide, then you can hide it.

In my old job, I use tab controls to make overlapping forms like that.  See picture below.  I didn't have to hide or unhide the forms; I just opened each individual tabs.  But someone people don't like tab controls because they create hassles in coding.  Richard puts tab control on his Evil Access Stuff list.
Kevin Yip  @Reply  
     
3 years ago

Brent Davis OP  @Reply  
     
3 years ago
I have tab controls on another form but I have heard they were evil so I wanted to try the labels.  I actually watched the vehicle maintenance extended cut and I was able to get them to work. Your suggestion at the beginning was correct, I was just doing it wrong.  Thanks so much for your assistance!
Brent Davis OP  @Reply  
     
3 years ago
Thanks to both Kevin's!

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access 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/7/2026 2:19:33 AM. PLT: 1s