[AccessD] Grab a text box's label's caption in code.

dmcafee at pacbell.net dmcafee at pacbell.net
Tue Jan 18 16:31:14 CST 2005


I was able to make it work with Dan's suggestion, but not Charlotte's. What
did I do wrong?

? me.txtMyTextBox.Controls(0).caption
Text0:
? me.txtMyTextBox.Parent.name
Form1


D

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of
dmcafee at pacbell.net
Sent: Tuesday, January 18, 2005 1:40 PM
To: Access Developers discussion and problem solving
Subject: RE: [AccessD] Grab a text box's label's caption in code.


The only way I know how to do that is if I manually name the label (usually
the same as the text box):

msgbox me.lblTxtEnter.caption

HTH
David

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com]On Behalf Of Lonnie Johnson
Sent: Tuesday, January 18, 2005 1:08 PM
To: AccessD solving'
Subject: [AccessD] Grab a text box's label's caption in code.


Can I somehow call the name of a textbox and get the caption of it's label?

I don't see a label property for a textbox.

Just curious.



May God bless you beyond your imagination!
Lonnie Johnson
ProDev, Professional Development of MS Access Databases
Visit me at ==> http://www.prodev.us












---------------------------------
Do you Yahoo!?
 Yahoo! Mail - Easier than ever with enhanced search. Learn more.
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com




More information about the AccessD mailing list