Hi All, I have a form with 4 tabs. Is it possible for me to enable/disable only one of the tabs while opening of that form on the run. ?? ( At the run time i would like to see the 2nd tab to be activated/enabled… ) if so pls do let me know. [:)]
Don’t think so. Option could be to disable all fields on the tab from code.
Hi, I’ve done such a job that looks like the thing you want to do, but it has nothing to to with the tab-control. It is a hard job dealing with visible-attributes in OnOpenTrigger and OptionButtons and and and … In the end it looks like what you are describing. Perhaps is it simpler to define 4 forms and to decide which form has to run
Hi Perhaps this can help you: 1. Set the form property ‘ActiveControlOnOpen’ with one control (the first) from tab 2 2. Put the following code in each first control on the other tabs:
**OnActivate()** If YourBoolean = True then CurrForm.YourFirstFieldOnTheSecondTab.ACTIVATE; So the user isn’t able to select another tab if YourBoolean = True. bye André
Another way to work around the problem… Define 2 TabControls overlapping each other…
- The first is containing all the pages (tabs) you want to show
- The 2nd is containing all, except the ones that you want to restrict the access
Then, at runtime, you can change the Visible Property of each Tab Control. Simply use the copy/paste to copy all controls from one page (tab) to another. It will copy also the code associated with your controls.