Control Has Focus?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Is there a way of finding out (in Access 2000 VBA code) whether or not a
control has the focus?

TIA Trev
 
If Screen.ActiveControl.Name = "txtMyTextBox" Then
MsgBox "txtMyTextBox has the focus"
End If

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia
 
Thanks grayham. I knew it would be easy 'once you know how'. I was looking
for things like .Hasfocus etc.
Thanks again for the incredibly speedy reply
Trev
 
Back
Top