Which PageName is active

I have a main form with 2 registers (PageName General,Test) and I would like to start one subform if the General is activated or the other subform when test is activated. How can I read out whether I’m on PageName General or on PageName Test?

Do you mean by register a tab in a TabControl? A TabControl doesn’t have any triggers and therefor you can’t read out on which tab you are.

Hi tinoruijs, no, I have a main formular. The propertie of PageNames is A,B,C. Then I got 3 subforms which are overlapped (one over the other). And I want to chose A and then my subform to table A should be shown, when chosing B I only want to see subform B and so on. But I don’t know, when I am on A who to find out where I am standing, it’s just the name of the FormPropertie “PageNames”. Thanks Klaus

I hope I understand you right… What you could do is use the OnActivate of a TextBox on the tab A to show subform A. Use the OnActivate of a TextBox on the tab B to show subform B. Use the OnActivate of a TextBox on the tab C to show subform C. I don’t know if it works, but you could give it a try. [:D]

If you only want to show different subforms for each tab, put the subforms on the tabs :wink: Another workaround: The first control on each tab (upper left) could set a variable which tell you on which tab you are. Set the value of this variable in the OnActivate-Trigger of the upper left control on each page. I hope this helps you.

quote:

If you only want to show different subforms for each tab, put the subforms on the tabs :wink:
Originally posted by Timo Lässer - 2005 Dec 25 : 20:49:21

This would be the easiest and best solution I think! That’s the solution we often use.

Check out the Sales Order Statistis form (402) You only change the VAT Amount when on the invoicing tab.