Unable to set focus to combobox after adding new record


Author
Message
Marcia G Akins
Marcia G Akins
StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
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


Paul Chase
Paul Chase
Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)Advanced StrataFrame User (576 reputation)
Group: Forum Members
Posts: 414, Visits: 2.8K
Marcia

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

Attachments
SFProp.bmp (119 views, 265.00 KB)
Marcia G Akins
Marcia G Akins
StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)StrataFrame User (496 reputation)
Group: StrataFrame Users
Posts: 322, Visits: 529
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.

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search