Google
 
Webnews.only-4-geeks.com
Interesting places
news.only-4-geeks.com Forum Index » Access

enabling a tab

 
Jump to:  
 
bfence
PostPosted: 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
PostPosted: 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
PostPosted: 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
 

Page 1 of 1 .:.

Google
 
Webnews.only-4-geeks.com

Windows Update | C++ | C | PHP | JavaScript | Photoshop | Programming | Windows 2000 | Python | Windows XP | Object | Flash | Flash - ActionScript | Paint Shop Pro | Excel | PowerPoint | Access | Word | Windows 98 | Internet Explorer 6.0 | CorelDraw12 | Java | XML | asm x86 | Linux Mandrake | Linux RedHat | Outlook |  | news from newsgroups |_ | s

Web Templates

Awesome Website Templates ©

rodos last minute Wypoczynek w szczawnicy Rakiety, wyrzutnie Moje jedyne marzenie - Anna Jantar Pozycjonowanie Stron