ethan.geerdes
Registered User.
- Local time
- Today, 09:52
- Joined
- Jun 4, 2015
- Messages
- 116
I am having trouble setting the focus on my forms... I have a parent form with two labels that are coded like this.
Private Sub Advisory Messages_Click()
Me![ Advisory Messages].Visible = _
Not Me![Advisory Messages].Visible
End Sub
Private Sub Security Updates_Click()
Me![Security Updates].Visible = _
Not Me![Security Updates].Visible
End Sub
I have the visible property set to no on the subform allowing the user to toggle the visibility when the label is clicked. The problem though is when I click inside the subform to use the scroll bar to view records, it transfers the focus to the subform making it almost impossible to close by clicking the label again because the label is on the parent form. I found the "me.parent.setfocus" command and a few other set focus commands but I don't know what I should be applying the command to in order to make it work. Any help would be appreciated.
Private Sub Advisory Messages_Click()
Me![ Advisory Messages].Visible = _
Not Me![Advisory Messages].Visible
End Sub
Private Sub Security Updates_Click()
Me![Security Updates].Visible = _
Not Me![Security Updates].Visible
End Sub
I have the visible property set to no on the subform allowing the user to toggle the visibility when the label is clicked. The problem though is when I click inside the subform to use the scroll bar to view records, it transfers the focus to the subform making it almost impossible to close by clicking the label again because the label is on the parent form. I found the "me.parent.setfocus" command and a few other set focus commands but I don't know what I should be applying the command to in order to make it work. Any help would be appreciated.