You'd have to have each tab check the data based on the tab the user came from. 
 
Assuming your form opens on tab A:
 
in On After Start EEP for the Form:
 
SET VAR vsavetab INTEGER = 0
(vsavetab should always represent the tab you're leaving)
 
On tab change for all tabs ( or do custom form action and call it):
SWITCH (.vsavetab)
CASE 0
  -- check data for tab a
  if error > PROPERTY tabcontrol ACTIVEPAGEINDEX 0 (goes back to tab a)
  else
  set var vsavetab = use GETPROPERTY to get active page index, so next on tab change will know which tab the user came from
  break
CASE 1
  -- check data for tab b
  if error > PROPERTY tabcontrol ACTIVEPAGEINDEX 1 (goes back to tab b)
  else
  set var vsavetab = use GETPROPERTY to get active page index, so next on tab change will know which tab the user came from 
 break
....etc. etc.
 
Haven't tried it, but it seems like it would do what you want.
 
Dawn
 
 
-------------- Original message from Frank Taylor <[email protected]>: --------------

I have been working with a form that is using an Enhanced Tab Control to enter the data into a table based on similar groups. I added an eep to each of the tabs under the custom eeps - on tab change eep.  This eep is supposed to check the current tab to make sure certain fields are filled in and if not dump the user back to fill them in, BEFORE moving to the next tab.  I think what I am seeing is that the design of the on tab change eep's are to only  be firing when you come into that tab and not when you are leaving the tab.  Such as I have the eep defined in Tab A, I click Tab B, the eep does not fire, I click back to Tab A and the eep fires.  Am I correct that this is how they are set up to function ?  If so, any creative suggestions to check the tab before moving to the next one ?  I know I can put a button on the tab that says 'continue' and use that to run my code and then use the property activepageindex  command to move to the next tab while at the same time hiding the tabs. but I really like the tabs at the top and hiding those and using a button seems like a waste of a nice control. Also some users may only need to put stuff in tab A and tab C, so being able to use the tabs at the top would be good for those users.

 

Thanks

 

-- Frank

 

 

Frank Taylor - Information Technology Administrator

F.J. O'Hara & Sons,  Inc - Araho Transfer Inc.

Boston, MA - Rockland, ME - Miami, FL

Direct Dial - 617-790-3093

email: [email protected]

 

 

Reply via email to