RE: Better way of navigating in a tab control with many tabs?



Hi crazyaccessprogrammer,

Thanks so much for taking the time to respond. I apologize that I do not
understand programming, so am not sure if what you have proposed is what I am
looking for. I really hope the code was something you copied and pasted, and
didn't write out from scratch.

There are many tabs on the tab control because the form *is* extremely
focused. The database isn't as simple as sales, customers and products. It
tracks legal cases, and all aspects of the cases. Each tab represents an
aspect of the case. Because there are so many "parts" to legal cases, and the
information is broken down logically by using a tab for each purpose of the
case, I was looking for a way to navigate easily to tabs that appear at the
end (or middle), instead of using the "next" arrow to switch between tabs.

I haven't seen anything out of the box that does this - but, I know there
are a lot of databasers out there with tricks up their sleeves, so thought
I'd post a question.

All of the tabs of the tab control should appear at all times. I was just
wondering if there could be a quicker way to navigate between tabs on a tab
control - other than the "next" and "previous" arrows.

Because I am not a programmer, I think this question falls under the "nope,
can't do it, you have to use the arrows to navigate" category. Thanks, again,
for taking the time to respond.


"crazyaccessprogrammer" wrote:

Comment:
Usually when I find myself in a situation where the number of pages on a tab
control is getting excessive, it's because the form itself isn't focused
enough. This sorta gets into database design in general... one thing you want
to have for your users is a clear purpose for each form. The clearer the
purpose the better the form will 'flow.'

Solutions
The whole problem is that a tab control contains a lot of pages. For the
sake of keeping things simple, my tab control will have only 3 pages.

Here is how I set up my controls on a sample form. You will have to
substitute names of controls and their captions using those in your existing
form.

PAGES of a TAB CONTROL PROPERITES:

Page 1
Name: Page0
Caption: General

Page 2
Name: Page1
Caption: Sales

Page 3
Name: Page2
Caption: Inventory

LISTBOX PROPERTIES

Name: MyListBox
ControlTipText: Use Ctrl or Shift To Select Multiple Items
Multi-Select: Extended
Row Source Type: Value List
Row Source: "Page0";"General";"Page1";"Sales";"Page2";"Inventory"
Column Count: 2
Column Widths: 0";1"
Column Heads: No

MyListBox AFTERUPDATE EVENT:

' Declare Variables
Dim intCurrentRow As Integer

' Main Loop
For intCurrentRow = 0 To Me.MyListBox.ListCount - 1

If Me.MyListBox.Selected(intCurrentRow) = True Then

' Make The Tab Control Page Visible
Me.Form.Controls.Item(Me.MyListBox.ItemData(intCurrentRow)).Visible = True

Else

' Make The Tab Control Page Invisible
Me.Form.Controls.Item(Me.MyListBox.ItemData(intCurrentRow)).Visible =
False

End If

Next intCurrentRow

SETTING DEFUALT PAGES TO VISIBLE/INVISIBLE WHEN FORM LOADS
Say you want only Page0 and Page2 visible when the form is opened. Paste the
following code into the form's OnOpen Event

' Declare Variables
Dim intCurrentRow As Integer

For intCurrentRow = 0 To Me.MyListBox.ListCount - 1

Select Case intCurrentRow

Case 0, 2
Me.MyListBox.Selected(intCurrentRow) = True

End Select

Next intCurrentRow

Call MyListBox_AfterUpdate




You can modify Case 0,2 for whatever pages you want visible when the form
loads.
.



Relevant Pages

  • Re: Better way of navigating in a tab control with many tabs?
    ... There are many tabs on the tab control because the form *is* extremely ... All of the tabs of the tab control should appear at all times. ... Caption: General ... Dim intCurrentRow As Integer ...
    (microsoft.public.access.forms)
  • Re: Tab Colors in Access2000
    ... Do you have the class clsTabs from Stephen's sample? ... Background color on a "tab" form ... Select the TAB control itself...not one of the individual TAB pages. ...
    (microsoft.public.access.forms)
  • Re: Tab Colors in Access2000
    ... The expression On Load you entered as teh event property setting produced the ... Background color on a "tab" form ... Select the TAB control itself...not one of the individual TAB pages. ...
    (microsoft.public.access.forms)
  • Re: Tab Controls
    ... seems to be what you did regarding tab controls. ... Background color on a "tab" form ... Select the TAB control itself...not one of the individual TAB pages. ... Candia Computer Consulting - Candia NH ...
    (microsoft.public.access.forms)
  • Re: Tab Controls
    ... Candia Computer Consulting - Candia NH ... seems to be what you did regarding tab controls. ... Background color on a "tab" form ... Select the TAB control itself...not one of the individual TAB pages. ...
    (microsoft.public.access.forms)