Using Cases to Change Events on Tab Controls

Comments

In order to give a tab control different events for each tab being clicked, you can use a case statement.

The case statement uses the case number to match to the Tab Page Index.  Each tab has an identifier, starting at 0.

This works well, as long as you don’t change the tab order or add new tabs. If you do change it, you will need to update your case statement.  If you want better menus, we strongly suggest you look into FMS Inc, and some of their menu systems.  You will see in my code below, we are using fmsNavigationMenu.

Code looks like this:

Case Statement Access

 

 

Related Posts

Access 2016 Relationships

Short blog today, this is a great read on relationships in Access 2016: Access 2016 Relationships Thanks to Microsoft for this one!

Microsoft Access Union Query from Hell. Skill Level: Demi-God

The worst query I ever had to write which powers a master report for the database user.  Here it is.  I don't think I can make it smaller, there were too many weird rules, aggregates, and translations in it.  And we needed to pull different columns based on criteria. ...

0 Comments

0 Comments

Submit a Comment