Navigation:  Articles > Oct-1997 >

Tip: Associate Labels With Controls

Previous pageReturn to chapter overviewNext page

Armen Stein          

In the August-1997  issue of Smart Access (see “Simulated Hyperlinks”), Helen Feddema describes a method for running a button’s code run when a corresponding text label is clicked. Helen used this to simulate a Web page hyperlink. Here’s an extension to Helen’s tip that puts the label right on the button and eliminates some code.

Create a label, color it blue, and underline it just as Helen describes in her tip. Then, cut the label out of the form by selecting it and pressing Ctrl-X. Now select the button and paste using Ctrl-V. The label will be associated with the button, just like labels associated with text boxes. When you click the label, the button also clicks and the button’s code runs.