Tip: Associate Labels With Controls

  Previous topic Next topic JavaScript is required for the print function  

Armen Stein          Bronze Collection   

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.