Expression to check if form have focus?

  • Thread starter Niklas Östergren
  • Start date
N

Niklas Östergren

Hi!

What expression do I use to check if a form have focus?

I have tryed with several expressions like:

If Forms!frmPerson.GotFocus Then
...
End If

Or

Forms!frmPerson.GotFocus = True Then
...
End If

But no one of this works!

TIA!
// Niklas
 
N

Nikos Yannacopoulos

Niklas,

How about:

If Forms(ActiveForm).Name = "frmPerson" Then
....

Would that work for you?

Nikos
 
Top