Tab change event

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a complex search menu with many criteria organized into groups with
the tab control (an unbound form). The button to execute the search via
stored procedure is outside the tab control. I want to check for errors on
one tab page before going to a new tab, so I put code in the tab change event
as suggested (Andy - June 19) to execute when I select a different tab.

Anyway, I found that it goes to the new tab first, then executes the code.
I wanted to AVOID going to the new tab. I can set focus to the offending
control on the original tab at the end of my change event, but then my code
fires off for the second time.
 
Why not use the click event instead? Or you can code logic to only run the
code once using tabindex numbers.
 
Bill said:
Why not use the click event instead? Or you can code logic to only
run the code once using tabindex numbers.

The Click event for a TabPage is not what you think it is. It does not fire
when you click on a "tab" to select a different page of the TabControl.
 
Back
Top