Return focus to field after GoToControl detour

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dlreich
    New Member
    • Sep 2008
    • 1

    #1

    Return focus to field after GoToControl detour

    While viewing a form, I use Find (Ctrl-F) to find a new record. In On Current for the form, I use GoToControl to adjust the display of one of the fields in the new record. Is there any way I can determine what field the Find was going to place the focus on? I would like to get that information before I do the GoToControl so that I can use another GoToControl at the end of the On Current event to return focus where it would have been without my programmed detour.

    Thanks,
    David
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32669

    #2
    Me.ActiveControl refers to the currently active control on your form.

    Me.ControlName.SetFocus sets the focus to the specified control.

    Comment

    Working...