Quote:
Could the problem be in the designer code or somewhere else?
|
That's good intuition. If you're pretty sure the code is correct, then there is sometimes a property on the form set by the Form Designer that changes the way things work.
Here, however, I don't think there are any properties that would change this.
I suspect the problem is in the code that displays the form. If you look at the pick button event handlers on the main form, one of the things they do before displaying the session form is setting the session form's SessionIndex property with code like this:
Code:
frm.SessionIndex = SessionIndex1;
Then the session form's Load event handler uses the form's SessionIndex to initialize the selected item. If the main form's event handler doesn't set SessionIndex, then it would default to 0 and the session form would always initially select the first item (with index 0).
Let me know if that works.