Syntax for Tab Control on form (1 Viewer)

BJF

Registered User.
Local time
Today, 18:52
Joined
Feb 19, 2010
Messages
133
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
 
Last edited:

liddlem

Registered User.
Local time
Today, 23:52
Joined
May 16, 2003
Messages
339
NOTE: There is a difference between tabs on a NAVIGATION form and tabs on a TAB control.
 

Users who are viewing this thread

Top Bottom