troubleshooting Question

Subform visibility

Avatar of Joy Gomez
Joy Gomez asked on
Microsoft Access
4 Comments1 Solution47 ViewsLast Modified:

I have a main form (Main_Menu) and 2 sub forms (Main_DLMP and Main_DeptView). In the main menu I have 2 labels that act as menu.  I have click events on both these labels.  I want to make one visible, and the other not visible.  But I struggling with this.  These are the 2 events I have for each of the labels in my main form.

 This is the event on the first label. As default Main_DLMP visibility is set to True and DLMP_DeptView is set to False.
    Forms![Main_Menu]![Main_DLMP].Form.Visible = True
    Forms![Main_Menu]![Main_DeptView].Form.Visible = False

This is the event on the second lablel
    Forms![Main_Menu]![Main_DeptView].Form.Visible = True
    Forms![Main_Menu]![Main_DLMP].Form.Visible = False
I am getting an error on the second label... Cannot set focus.
Anders Ebro (Microsoft MVP)
Microsoft Developer

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 4 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros