Hello
I've searched, posted and solved this (Thanks for helping!), but now it came back to bite me in the *ss.
I have a Yes/No field that is represented by a check box in my form1.
I want to show another field (textbox) when the mouse pointer goes over the checkbox, and make it not visible when the mouse moves away from it.
My problem is that when I make the textbox diseappear, if the user set focus on it and moves the mouse away, Access gives me a "Can't hide a control while it has focus" error.
My question is: How can I resolve this problem?
I later added this: text2.SetFocus
I need to set focus on something else, but I can't do with the "when mouse moves on top of the form's background" thing, because then whenever the user moved the mouse on the background, the focus would be set to the same thing, i.e. user types in something to text1 (show/hide textbox) and then wants to change text3 (visible), but can't move the mouse because the focus would be set to text2.
This is the code I used:
I will appreciate any help possible,
Thank you
I've searched, posted and solved this (Thanks for helping!), but now it came back to bite me in the *ss.
I have a Yes/No field that is represented by a check box in my form1.
I want to show another field (textbox) when the mouse pointer goes over the checkbox, and make it not visible when the mouse moves away from it.
My problem is that when I make the textbox diseappear, if the user set focus on it and moves the mouse away, Access gives me a "Can't hide a control while it has focus" error.
My question is: How can I resolve this problem?
I later added this: text2.SetFocus
I need to set focus on something else, but I can't do with the "when mouse moves on top of the form's background" thing, because then whenever the user moved the mouse on the background, the focus would be set to the same thing, i.e. user types in something to text1 (show/hide textbox) and then wants to change text3 (visible), but can't move the mouse because the focus would be set to text2.
This is the code I used:
Code:
Private Sub Chck1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) text1.Visible = True End Sub Private Sub Detail_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single) text1.Visible = False End Sub
Thank you
Comment