>Hi,
>
>I want to set the focus back to the previous active control
>when a button is pushed.
>
>How can I know which is the previous active control?
nD=THIS.TabIndex && The current controls order # on the form
cN=THISFORM.Controls(nD-1).Name && Name of the previous control in tab order
THISFORM.Controls(nD-1).SetFocus() && Set Focus to the previous control
THISFORM.Controls(nD-1).Value = "HI" && Set a value for the previous control
Hope these examples help.
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05