Rabu, 08 Agustus 2012

RE: [MS_AccessPros] Subform LOST FOCUS help

 

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

__._,_.___
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar