Click to See Complete Forum and Search --> : MS Access 2002 - Active Window problem


CallMeAndy
June 21st, 2005, 11:59 AM
Set frm = Screen.ActiveForm
If frm.Name <> "" Then
Set ctlCurrentControl = Screen.ActiveControl
End If

I am trying to determine which control has got the focus in an OnCurrent event
in order to return the focus to same at end of Sub, which moves the focus away from the current control.

However I am getting an error message 2474 saying that: the expression you entered requires the control to be in the active window.

the code snipet verifies that I have the correct form with the focus - so what am i not understanding or aware of please.

Thanks