Store Label Name in a Table

jboyle

New member
Local time
Today, 01:28
Joined
Nov 18, 2000
Messages
53
I have a form that has several labels. Each of these lables has been given a unique name. When the user clicks on one of the labels, I want the name of the label to be stored in a table. What macro or event procedure could I use to store the name of the label in a table called LABEL TABLE.
 
You need to create a text box that is bound to your label name field in the label table. Then in the On_Click event of your label use this code:

txtYourTextBox = lblYourLabelName.Caption
DoCmd.RunCommand acCmdSaveRecord
 
There is no macro that will do this for you. You'll need to create a public sub or function that runs an append query. Then in the click event of every label whose name you want to store, you need two lines of code. One to store the label name into a variable and a second to call your function or sub to run the append query.
 

Users who are viewing this thread

Back
Top Bottom