If you manage all the details just right, it can be done, but it takes careful design work and scripting.
- You have to set your tab labels to zero width and replace them with buttons.
- The buttons have to be placed so that at least one pixel row is above the border of the tab control (otherwise all the buttons become part of the first tab.)
- Then you can use conditional formatting to change the color of the button and/or it's text to show the user whether or not the tab is accessible.
- You also need to give each tab an object name in the Inspector (FMP 11) or Object Info (Filemaker 10 and earlier) palette.
- Your buttons can then use a script that checks your flag or other condition to see if the tab should be accessible. If so, it uses go to object to bring up the desired tab. If not, it does nothing.
Great Idea. I just found another simple way. I made two duplicate layouts with some tabs removed from each. Based on my flag setting I select the correct layout and make sure I am on the same main record.
Yeah, that works to and is easier to set up as you can duplicate your original layout and then modify the copy to get your second version. It can, however, lead to having a lot of duplicate layouts to maintain if you have a number of different tabs you want to show as "disabled" in certain situations.
As always, there are trade offs.
I made two duplicate layouts with some tabs removed from each. Based on my flag setting I select the correct layout
You could also place two tab controls inside a third one, and select the correct one - using only one layout.