Setfocus to control when Enabled = False ?

  • Thread starter Thread starter Rebecca
  • Start date Start date
R

Rebecca

Is it possible to setfocus to a control where enabled is
false?
If not, can I test the enabled propery before doing this
and if unset, set the focus elsewhere?
How would I do that?
I just had to disable a control in certain circumstances
but another routine is assuming it can always setfocus
there.
Rebecca K.
 
Hi Rebekka,

My name is Dennis Schmidt. Thank you for using the Microsoft Newsgroups.

This should work:

If Me!TextBox1.Enabled = False Then
Me!TextBox2.SetFocus
Else
Me!TextBox1.SetFocus
End If

I hope this helps! If you have additional questions on this topic, please
reply to this posting.

Need quick answers to questions like these? The Microsoft Knowledge Base
provides a wealth of information that you can use to troubleshoot a problem
or answer a question! It's located at
http://support.microsoft.com/support/c.asp?M=F>.

This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use. © 2001 Microsoft Corporation. All rights
reserved.

Regards,
Dennis Schmidt
Microsoft Support
 
Back
Top