G
Guest
I'm attempting to set the focus to a control on a subform if one of the
fields is blank. The field name to set focus to is stored in the variable
FirstError. The code I'm trying to use is:
If Check = False Then
Me.Controls(FirstError).SetFocus
Exit Sub
End If
In the immediate window, the FirstError variable displays the correct
control name on the subform, but the syntax is incorrect and can't find the
control to set focus to. Any ideas?
Thanks,
Melanie
fields is blank. The field name to set focus to is stored in the variable
FirstError. The code I'm trying to use is:
If Check = False Then
Me.Controls(FirstError).SetFocus
Exit Sub
End If
In the immediate window, the FirstError variable displays the correct
control name on the subform, but the syntax is incorrect and can't find the
control to set focus to. Any ideas?
Thanks,
Melanie