M mscertified Mar 13, 2008 #1 in the OnClick event for a textbox, can I get the caption of the associated label?
M Marshall Barton Mar 13, 2008 #2 mscertified said: in the OnClick event for a textbox, can I get the caption of the associated label? Click to expand... If the event knows the name of the text box: Me.textbox.Controls(0).Caption If you are using a general function for a bunch of text boxes: Me.ActiveControl.Controls(0).Caption I suspect that you should use the Enter event instead of the Click event so the code will run when users tab to the text box.
mscertified said: in the OnClick event for a textbox, can I get the caption of the associated label? Click to expand... If the event knows the name of the text box: Me.textbox.Controls(0).Caption If you are using a general function for a bunch of text boxes: Me.ActiveControl.Controls(0).Caption I suspect that you should use the Enter event instead of the Click event so the code will run when users tab to the text box.