Reputation: 11148
I have continuous forms made of a header section and a detail section. Controls in detail section are bound to a recordset, while the ones in the header are not bound.
At opening time, focus is made on the first (left) control of the detail section or, if the recordset is empty, first (left) control of the header section. In such a situation, and for forms that need an horizontal scrollbar, the scrollbar will be set to the right side of the form, and left-side info wil be hidden, confusing the user.
Any way to make sure that, in all case, my form will open with its left side visible?
Thanks
Upvotes: 3
Views: 999
Reputation: 16796
Usually to avoid focus discrepancies, I use a small transparent button that I just call btDeadFocus
in the header -or the detail section- of my forms.
This invisible button doesn't actually do anything more than capturing the focus. I just make sure that this button is set it as the first control on the form using the tab order list.
The button also becomes useful in situations where the focus cannot be kept on a control. For instance a control that needs to be disabled. I just move it to the btDeadFocus
instead.
Upvotes: 3