I have a set of controls that are made visible upon clicking a button. When a subsequent button is pressed, these controls are made invisible again. This is what I am using right now.
All of these go invisible, but when I try to set the visibility of the cmdUpdateProfile to False, I get the "You can't hide control that has the focus" error message. I don't understand this, because it no longer has focus.
Note that the cmdUpdateProfile is the button I am clicking as well as the button I am trying to hide...this may be the issue.
Please give me any suggestions as to how to fix this.
Code:
Private Sub cmdUpdateProfile_Click()
Forms!frmWelcome.setfocus
tboname.visible = false
tbophone.visible = false
tboPassword.visible = false
tboautologin.visible = false
cmdUpdateProfile.visible = false
End Sub
All of these go invisible, but when I try to set the visibility of the cmdUpdateProfile to False, I get the "You can't hide control that has the focus" error message. I don't understand this, because it no longer has focus.
Note that the cmdUpdateProfile is the button I am clicking as well as the button I am trying to hide...this may be the issue.
Please give me any suggestions as to how to fix this.