MANIPULATING CONTROLS THROUGH CODE

Using VBA to manipulate controls is easy. Access lets you control the various properties needed, even at runtime.

Figure 10.31 shows a form that's used for a main switchboard. This form uses an option group with toggle buttons to emulate a tabbed menu.

Figure 10.31. These command buttons, used as menu choices, are swapped out with code based on the toggle button clicked.

Note

This example can be done by using the native Access Tab control described earlier in the section “Working with the Native Access Tab Control.” I use the option group here to show manipulating controls on-the-fly and creating dynamic interfaces. ...

Get F. Scott Barker's Microsoft® Access 2000 Power Programming now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.