Hi Paul
The trick is to test if the control you want to hide is the active control
and, if so, set the focus somewhere else before you make it invisible (or
disable it).
Something like this:
If Me.ActiveControl.Name = "SubformControlName" Then
Me("SomeOtherControl").SetFocus
Me("SubformControlName").Visible = False
To be a bit more fancy, you could use a tiny transparent command button
named "cmdPark" to take the focus. Then, when the mouse rolls off and you
restore the visibility of the subform, you can check if you are on that
button and set focus back to the subform:
If Me.ActiveControl.Name = "cmdPark" Then Me("SubformControlName ").SetFocus
Make sure cmdPark has TabStop set to "No".
Good luck! :-)
Graham
Rabu, 08 Agustus 2012
RE: [MS_AccessPros] Subform LOST FOCUS help
__._,_.___
.
__,_._,___
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar