Hello all,
I am trying to set focus to a specific field on my form every time that this particular tab is selected.
I have tried putting the following code into the 'on click' event of that tab.
Me.TabSalesOrders.Pages("SALES ORDER")!SearchSoNumber.SetFocus
TabSalesOrders is the name of my tab control
SALES ORDER is the name of that page or tab
SearchSoNumber is the field I'm trying to set focus to whenever switching to this tab.
I dont get an error from this, it just doesn't do anything. The focus goes to an undesired field. What am i doing wrong?
Put it this way, when i open the form i have code on current to set focus to SearchSoNumber and it works great, but if i switch to another tab and then back, the focus is in a field that i dont want having focus.
Thanks,
BJF
I am trying to set focus to a specific field on my form every time that this particular tab is selected.
I have tried putting the following code into the 'on click' event of that tab.
Me.TabSalesOrders.Pages("SALES ORDER")!SearchSoNumber.SetFocus
TabSalesOrders is the name of my tab control
SALES ORDER is the name of that page or tab
SearchSoNumber is the field I'm trying to set focus to whenever switching to this tab.
I dont get an error from this, it just doesn't do anything. The focus goes to an undesired field. What am i doing wrong?
Put it this way, when i open the form i have code on current to set focus to SearchSoNumber and it works great, but if i switch to another tab and then back, the focus is in a field that i dont want having focus.
Thanks,
BJF
Last edited: