Greetings Pan X experts!
When moving from record to record, I would like the panel to stay on the same panel as viewed in the previous record. In other words, I always want the selected panel to remain the same, unless I click on another tab panel button.
How might I accomplish this goal? Am I to use the “Default” option in some way?
The Tab Panel should remain in its current state as you move from record to record under normal conditions. What is displayed is determined by the value of the variable assigned in the Tab Panel Options.
So if you have something changing that variable as you move from record to record, that could cause the Tab Panel to change. Without testing it, I have to wonder if the Form Properties are set to assign a value.
If I were debugging it, I’d use the View Search to hunt down all occurrences of the variable.
I guess it is possible you have the Tab Panel variable set to a field so that is what is forcing the tabs to change with each record. If this is the case you should set the Tab Panel variable to a new variable so that it would no longer follow the value of the old field in each record. You could then change tabs by clicking another tab or have a button that sets the tab to the value in the current records old field.
Where is the Tab Panel variable?
Currently, the tab panel keeps track of the panel name in the field “PanelName” (see below).
I tried to leave the “Data” option empty, but then the Tab Panel simply does not work. Can I put a variable into this slot?
Yes you can. See Tab Panel Buttons and Selection in the Help file.
If PanelName is the name of a field, then the panel will switch record by record depending on the field contents.
You can create a variable instead and enter it in the Data, then as you click on the Tabs, the name of the tab becomes the value of the variable which sets the panel’s contents.
OK. My .Initialize procedure now creates a fileglobal variable. And I inserted this variable into “Data:” field, in the Tab Panel Options menu.
Thank you everyone for your help! This solution works well.