StrataFrame Forum

Unable to set focus to combobox after adding new record

http://forum.strataframe.net/Topic24956.aspx

By Marcia G Akins - 10/21/2009

Hi all.

Gere is my code:

private void boSchedule_dtl_AfterAddNew(EventArgs e)

{

boSchedule_dtl.schedhdr_id = schedhdr_id;

ActiveControl = cboteam1_id;

cboteam1_id.Select();

}

but when I step though it, the debugge tells me that the activeControl is toolstripcontainer1!

What is going on here? I am just trying to make data entry easier for my users.

TIA.

Marcia

By Paul Chase - 10/21/2009

Marcia

You can set the form level property FocusControlOnAdd to the control you want.  

By Marcia G Akins - 10/21/2009

Paul Chase (10/21/2009)
Marcia

You can set the form level property FocusControlOnAdd to the control you want.  

Thanks, Paul! I knew it had to be simple.