Is there anyone else who is programming VBA here?
I'm trying to get this code to work
Private Sub button3_click() 'hide main buttons button1.Visible = False button2.Visible = False button3.Visible = False 'show submenu buttons button4.Visible = True; button5.Visible = True; End Sub
What I am trying to do basically is that I have a main form that has 5 main buttons. 2 of them are hidden at startup. Therefore, when I press button 3, I want to hide the first three main buttons and βshowβ the other two. When I try to execute this event, I received an error message
" Runtime Error 2165 - You cannot hide the control with focus .
Has anyone encountered this aspect of programming before? I am sure this is doable. I just donβt understand what is wrong here ...
access-vba ms-access button onclick
awongCM
source share