Advertisement

02.22.2007 at 03:32PM PST, ID: 22407974
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

Why does the tab control "OnClick" Event not fire when a tab is clicked?
Tags: tab, event, control, click
I know what is going on here, I just wanted an explanation why?  I know the way it works is if a tab is clicked, the user has to actually click on the actual page, not just the tab, for the event to be fired.  Why has Microsoft done this?  This seems to defeat the whole purpose of having an onclick event.  I already have the solution - to do an onchange event for the whole tab control and use a Case statement to determine which tab was selected, but this is more work for a task that should be so simple.  Anyone have an answer to this?
Start your free trial to view this solution
Question Stats
Zone: Microsoft
Question Asked By: CyprexxDev
Solution Provided By: LPurvis
Participating Experts: 3
Solution Grade: A
Views: 225
Translate:
Loading Advertisement...
02.22.2007 at 03:37PM PST, ID: 18592611

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.22.2007 at 03:41PM PST, ID: 18592637

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.22.2007 at 03:50PM PST, ID: 18592677

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.22.2007 at 04:01PM PST, ID: 18592719

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.22.2007 at 11:17PM PST, ID: 18594304

Rank: Genius

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
02.26.2007 at 07:36AM PST, ID: 18609780

All comments and solutions are available to Premium Service Members only.

Start your 7 day free trial and see for yourself why Experts Exchange is the easiest and most proven technology resource in the world. Get Started

Already a member? Login to view this solution.

 
 
Loading Advertisement...
Microsoft
  • Internet Protocols
  • Applications
  • Development
  • OS
  • Hardware
  • Windows Security
Apple
  • Operating Systems
  • Hardware
  • Programming
  • Networking
  • Software
Internet
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Spy / Ad Blockers
  • Web Browsers
  • New Net Users
  • Web Development
  • Chat / IM
  • Anti Spam
  • Web Servers
  • Anti-Virus
  • Email Clients
Gamers
  • Tips
  • Online / MMORPG
  • Puzzle
  • Emulators
  • Action / Adventure
  • Role Playing
  • Consoles
  • Game Programming
  • Strategy
  • Sports
  • Misc
  • Computer Games
Digital Living
  • Hardware
  • New Net Users
  • New Users
  • Software
  • Digital Music
  • Gaming World
  • Home Security
  • Apple
  • Networking Hardware
Virus & Spyware
  • Vulnerabilities
  • IDS
  • Encryption
  • Anti-Virus
  • Operating Systems Security
  • Software Firewalls
  • WebApplications
  • Cell Phones
  • Operating Systems
  • Internet
  • Hardware Firewalls
Hardware
  • Handhelds / PDAs
  • Displays / Monitors
  • Components
  • Networking Hardware
  • Peripherals
  • Laptops/Notebooks
  • Storage
  • Servers
  • Desktops
  • New Users
  • Misc
  • Apple
Software
  • System Utilities
  • Industry Specific
  • Network Management
  • Photos / Graphics
  • Page Layout
  • VMWare
  • Misc
  • Web Development
  • OS
  • CYGWIN
  • Voice Recognition
  • Message Queue
  • Quality Assurance
  • Security
  • Firewalls
  • MultiMedia Applications
  • Development
  • Database
  • Office / Productivity
  • Business Management
  • OS/2 Apps
  • Server Software
  • Internet / Email
ITPro
  • OS
  • Storage
  • Encryption
  • Operating Systems Security
  • Apple Hardware
  • Laptops & Notebooks
  • Servers
  • Networking Hardware
  • Peripherals
  • Devices
  • Displays / Monitors
  • WebTrends / Stats
  • Search Engines
  • Firewalls
  • WebApplications
  • IDS
  • Vulnerabilities
  • Email Clients
  • File Sharing
  • Spy / Ad Blockers
  • Web Browsers
  • Web Servers
  • Networking
  • Anti-Virus
  • Chat / IM
  • Anti Spam
Developer
  • Web Servers
  • Web Browsers
  • Game Programming
  • Dev Tools
  • Industry Specific
  • Office / Productivity
  • Database
  • CYGWIN
  • Web Development
  • Search Engines
  • File Sharing
  • WebTrends / Stats
  • Programming
  • Content Management
  • Application Servers
  • Protocols
Storage
  • Removable Backup Media
  • Storage Technology
  • Servers
  • Grid
  • Remote Access
  • Backup / Restore
  • Misc
  • Hard Drives
OS
  • Miscellaneous
  • Security
  • Development
  • Linux
  • VMWare
  • MainFrame OS
  • Unix
  • Apple
  • OS / 2
  • AS / 400
  • BeOS
  • Microsoft
  • VMS / OpenVMS
Database
  • Oracle
  • Miscellaneous
  • MySQL
  • Software
  • Sybase
  • Contact Management
  • PostgreSQL
  • Data Manipulation
  • Clarion
  • InterSystems Cache
  • Siebel
  • MUMPS
  • OLAP
  • SQLBase
  • SAS
  • GIS & GPS
  • 4GL
  • Berkeley DB
  • DB2
  • Informix
  • Interbase / Firebird
  • FoxPro
  • Reporting
  • LDAP
  • Filemaker Pro
  • MS SQL Server
  • dBase
  • MS Access
Security
  • Misc
  • Web Browsers
  • Software Firewalls
  • Operating Systems Security
  • File Sharing
  • Spy / Ad Blockers
  • Vulnerabilities
  • WebApplications
  • IDS
  • Anti-Virus
  • Encryption
  • Anti Spam
  • Email Clients
  • VPN
  • Chat / IM
Programming
  • Editors IDEs
  • Installation
  • Handhelds / PDAs
  • Multimedia Programming
  • System / Kernel
  • Algorithms
  • Game
  • Signal Processing
  • Project Management
  • Open Source
  • Database
  • Misc
  • Languages
  • Processor Platforms
  • Theory
Web Development
  • Scripting
  • Blogs
  • Web Servers
  • Software
  • Search Engines
  • Web Graphics
  • Images
  • Internet Marketing
  • Images and Photos
  • Components
  • Document Imaging
  • Web Languages/Standards
  • Illustration
  • WebApplications
  • Fonts
  • WebTrends / Stats
  • Authoring
  • Digital Camera Software
  • Miscellaneous
Networking
  • Protocols
  • Apple Networking
  • Network Management
  • Message Queue
  • Application Servers
  • Content Management
  • File Servers
  • Email Servers
  • Misc
  • Java Editors & IDEs
  • Wireless
  • Networking Hardware
  • Backup / Restore
  • System Utilities
  • ISPs & Hosting
  • Web Servers
  • Storage Technology
  • Removable Backup Media
  • Servers
  • Broadband
  • Grid
  • OS / 2
  • Novell Netware
  • Unix Networking
  • Windows Networking
  • Security
  • Telecommunications
  • Operating Systems
  • Linux Networking
Other
  • Community Advisor
  • Lounge
  • Community Support
  • New Net Users
  • Philosophy / Religion
  • Math / Science
  • Miscellaneous
  • URLs
  • Expert Lounge
  • Politics
  • Puzzles / Riddles
Community Support
  • Suggestions
  • New to EE
  • New Topics
  • Community Advisor
  • CleanUp
  • Announcements
  • General
  • Feedback
  • Input
  • EE Bugs
 
02.22.2007 at 03:37PM PST, ID: 18592611

Rank: Genius

Use the Tab_Change event to run code when the user clicks on a different tab.
 
02.22.2007 at 03:41PM PST, ID: 18592637

Rank: Genius

Oops, suppose I should read all of the question.

>the user has to actually click on the actual page, not just the tab, for the event to be fired.
Just clicking on the tab fires the TabControl_Change event fires, with the value of Me.TabControl being whatever the PageIndex is of the tab the user clicked.

I haven't experienced in any version of Access where the user has to click on the tab, then the page, for the TabControl_Change event to fire.   If there was a subform on the tab, then when clicking on the tab THAT subform's OnFocus event would fire.

Just out of curiosity, what code are you trying to run in the TabControl_Change event?

Hope this helps.
-Jim
 
02.22.2007 at 03:50PM PST, ID: 18592677

Rank: Genius

> I know the way it works is if a tab is clicked, the user has to actually click on the actual page, not just the tab, for the event to be fired.<

Not in my apps.  You don't see the page until you click on the appropriate tab. In my forms with a multipage tab select, I make each page the same size.  There is no way to select a different page except by the tabs.
 
02.22.2007 at 04:01PM PST, ID: 18592719
Jim, If the user clicks on a tab, the associated page will open.  If the user then clicks on that page (anywhere EXCEPT within a subform), the TAB'S OnClick event will fire - I have verified this and in Access 2003 it is fact.  What I don't understand is why the user has to click the PAGE for the tab's OnClick event to fire when the event belongs to the tab.  It's backwards...

I have subforms on each page that are populated based on a form global recordset within the main form.  Each subform is in a different page.  When the user clicks on a tab that is associated with each page, I want the recordset's to populate (or refresh) for that specific page's subform.

GrayL...  I'm not sure what you mean by this.  I haven't stated that I don't see the page when I click on the tab?  I said the user has to click on the page for the associated tab's events to be fired.
 
02.22.2007 at 11:17PM PST, ID: 18594304

Rank: Genius

OK then - let's talk facts.  :-D
(And perception)

As you stated (and has been re-iterated since) the Tab Control's Change event fires when you change between tabs.  
It is not true that the tab control's click event fires if you click the body of the page however.  That click event occurs only if you click on the outer container of the tab (the thin edge around the page or any exposed area to the right of the tabs).
A single Page's click event fires when you click in the body of a page that is currently selected.
(Make sure you haven't inadvertently been clicking an event other than the page click - for example under 2003, with XP control themes, you can't see through the tab control - but it might still be set to transparent.  Check the selected object name when you're examining the control).

Perhaps you're used to the event model of a tab control or tab strip from VB or an alternative development environment.  Whichever way - it's consequently your perception that the Access control's events are "backwards".

But IMHO Access great strength over other development platforms is that is is data centric.
It is designed to work with data - it's why it exists.
More of it's controls have a Value property.  Consequently developers need to determine when the Value of a control has changed more so than in other environments.
Once there is a Change event - then it would make no sense to give a Click event the exact same role.
So it is used to determine when the tab control itself (and not a page body and not a tab strip caption) has been clicked.

In your question you say "this is more work for a task that should be so simple".
That's one interpretation of it.
However it could be said that it's a slightly greater amount of development time (almost none when you're used to it and juggling coconuts in Access) for a flexability that isn't there otherwise.
Even in VB.NET with it's wealth of events for a tab control... those that are actually of use... doesn't offer this same generic methodology.  One that does, if need be, lend itself to data manipulation.
Accepted Solution
 
02.26.2007 at 07:36AM PST, ID: 18609780
Thanks for your explanation LPurvis.  I will assign you points for this since it's the best answer I'm probably going to receive :-)  No offense to you, it's probably the best answer available...  I just don't see what would be so hard about allowing the tab's OnClick event from running when a user "clicks" the tab - as would be assumed based on the name of the event and what it does anywhere else within the Access application.  I realize it would be somewhat of a duplicate to the entire tab control's OnChange event, but duplicate events exist everywhere throughout the application.  However, I will stop here.  This was not meant to be posted as a complaint as no one here can do anything about it :-)  I wanted an explanation and you provided that.  Thanks!
 
 
20080236-EE-VQP-29