Friday, January 17, 2014

Tabstrip Vs. Multipage

The question:

Being fairly new to this VBA stuff, sometimes I run into two things that look alike but I want to know the difference.  While working on a form I noticed Tabstrip and Multipage objects and tried to figure out why two things so alike would both be here.

Was it just two developers at MS who couldn't get along as to the way things "should" be?  Is there some technical whizbangery that sets them apart?  (That'll get a big "Who cares?" from me.)  In matters like these, I always hope there is a business or presentation difference, a time when one is much more appropriate than the other.

The Answer:

There are differences.  Good differences.

Briefly, a user's "why" perspective:
  • Multipage. Think "Subject".  Use this when there is are different kinds of information to be collected or displayed and one thing.  Each page on a multipage is independent from the others with respect to layout and data presented.
  • Tabstrips.  Think "Context". Use these when you need to present or gather the same information, just about different things.  Each tab on a tab strip shows the same information, except in different context. 
From a technical perspective:
  • A page of a multipage control is a container, i.e., when a textbox is added to a page, it's parent is the page.  The purpose of the page is to group content.
  • A tab of a tabstrip is related to the controls it masters, and the bottom-level controls (e.g. textboxes) are often contained in a Frame object. The purpose of the tab is to communicate to the frame (or other controls), the context.

Examples:

Which is "better"?  That's like asking if a spoon or fork is better.  They are different not only in there look-and-feel but also from a functional viewpoint.  Each has its purpose.

Multipage

Multipage controls , as mentioned above, is appropriate for displaying/gathering different sets of information about a specific thing.  If you see a document that has different chapter subjects about a person, or organization.  
  • Financial reports have sections for Income Statement, Balance Sheet, Cash Flow, etc.
  • An employee multipage control might have different pages for personal information, education and training, experience, and performance reviews.
  • Outlook is a "multipage" application for managing a person's appointments/meetings, emails, assignments/tasks, etc.

Tabstrips

Tabstrips are for collecting or presenting the same type of information about a group of people, places, things.  If someone hands you a sheaf of resumes, they are like tabstrips, only messier.
  • Tabs can present the budgets and consumption for a number of departments.
  • Reports from different periods (e.g. previous quarter, 2 quarters ago, etc) can be triggered by tab selection.  Two sets of tabs could be used for monthly reporting over multiple years.

Using Multipage and Tabstrips together

 A tabstrips can be used on a page of a multipage control, and a tabstrip can be used so that the multipage changes context.

  • Suppose the objective is to provide different facets (Budget, Expenses, Headcount) of the Departments of a company.  In this case, the context (tabstrip) would list the Departments from the outside of the Multipage control.
  • Suppose there is a page for Operational Dashboard.  On this page could be a tabstrip to control whether it is the current or a past time period.

Alternatives

Tabstrips in place of Multipage Controls

It is possible to make a tabstrip act like a multipage control.  The trick, from what I read, is to make the Tab selection show/hide frames.  This seems to add coding effort when there is a suitable object type to get the job done.

Multipage Controls in place of Tabstrips

It is possible to make the multipage control to act like a tabstrip.  This requires using the same layout on each page, which creates maintenance issues.

Other controls in lieu of Tabstrips & Multipage Controls

Combo boxes, list Boxes, check boxes, and radio buttons can be used in place of a tabstrip. Responding to Change events and/or the Click event of a Command Button, the frames can be shown/hidden and the data can be refreshed per the new parameters.  This may be preferable in cases where there are multiple layers to the data.

One advantage to drop-downs and list boxes is the User Forms don't need to be dynamically built or re-arranged.  

Multi-selection is a reason to use check boxes and list boxes  Using these would allow a user to combine financials and staff lists of different organizations, once the programming is done.

No comments:

Post a Comment