Activate a Tab when selecting a Check Box?

escoyne

Registered User.
Local time
Today, 12:11
Joined
Jul 24, 2009
Messages
32
I have a form with several tabs. One of the tabs I want to remain hidden until a check box is "checked".

How do I do about activating the tab once its been checked?

Thanks
Jason
 
use the afterupdate event.
what have you tried so far?
 
wazz, I havent' tired anything yet. I'm completely clueless. I'm trying to learn Access as I'm building my database.
 
Code:
Private Sub [B]CheckBoxName[/B]_AfterUpdate()
 If Me.[B]CheckBoxName[/B] = -1 Then
  Me.[B]TargetPageName[/B].Visible = True
  Me.[B]TabControlName[/B] = 1
 Else
  Me.[B]TargetPageName[/B].Visible = False
 End If
End Sub
And so that the page is visible/invisible in moving record to record:

Code:
Private Sub Form_Current()
 If Me.[B]CheckBoxName[/B] = -1 Then
  Me.[B]TargetPageName[/B].Visible = True
  Me.[B]TabControlName[/B] = 1
 Else
  Me.[B]TargetPageName[/B].Visible = False
 End If
End Sub

The pages are zero-based, so the first page is 0, the second page is 1, and so forth. You need to modify the line

Me.TabControlName = 1

in both codes above to reflect the actual page index of the page you're hiding/showing.

You also need to replace the names that are Bold in the code above with your actual object names.
 
Thanks... Worked exactly like I wanted....
 

Users who are viewing this thread

Back
Top Bottom