|  | enabling a tab |  | |
| | | bfence |  |
| Posted: Fri Aug 29, 2008 7:35 pm Post subject: enabling a tab |  |
Hi! I have a parent form (TC_Char) with a subform (Cand). On Cand I have a tab control with a subform (ST) I'd like to enable ONLY when the CandDecision field says "Admitted". Is there a way to do this? Each Candidate can have more than one Cand record - it depends on the status of their applications.
Thanks in advance for the help! Betsy |
| |
| | | Beetle |  |
| Posted: Fri Aug 29, 2008 7:35 pm Post subject: RE: enabling a tab |  |
| |  | |
You can do the following;
Me.tbYourTabControl.Pages(x).Enabled = False
where x = the Page Index of the tab in question. This will not prevent users from selecting/viewing the tab, but it will prevent them from entering/editing anything on the tab. If you don't want them to even be able to select the tab then use;
Me.tbYourTabControl.Pages(x).Visible = False
Now, without knowing more about your form setup, it's hard to tell you exactly how to code it, but if the CandDecision control is on the same form as the tab control then you might try something like this in the Current event of that form;
Me.tbYourTabControl.Pages(x).Enabled = Me.CandDecision = "Admitted" -- _________
Sean Bailey
"bfence" wrote:
| Quote: | Hi! I have a parent form (TC_Char) with a subform (Cand). On Cand I have a tab control with a subform (ST) I'd like to enable ONLY when the CandDecision field says "Admitted". Is there a way to do this? Each Candidate can have more than one Cand record - it depends on the status of their applications.
Thanks in advance for the help! Betsy
|
|
| |
| | | bfence |  |
| Posted: Sat Aug 30, 2008 4:53 pm Post subject: Re: enabling a tab |  |
| |  | |
On Aug 29, 3:43 pm, Beetle <Bee...@discussions.microsoft.com> wrote:
| Quote: | You can do the following;
Me.tbYourTabControl.Pages(x).Enabled = False
where x = the Page Index of the tab in question. This will not prevent users from selecting/viewing the tab, but it will prevent them from entering/editing anything on the tab. If you don't want them to even be able to select the tab then use;
Me.tbYourTabControl.Pages(x).Visible = False
Now, without knowing more about your form setup, it's hard to tell you exactly how to code it, but if the CandDecision control is on the same form as the tab control then you might try something like this in the Current event of that form;
Me.tbYourTabControl.Pages(x).Enabled = Me.CandDecision = "Admitted" -- _________
Sean Bailey
"bfence" wrote: Hi! I have a parent form (TC_Char) with a subform (Cand). On Cand I have a tab control with a subform (ST) I'd like to enable ONLY when the CandDecision field says "Admitted". Is there a way to do this? Each Candidate can have more than one Cand record - it depends on the status of their applications.
Thanks in advance for the help! Betsy
|
Thanks Sean! I'll give this a try.
Betsy |
| |
|
|