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

Stuart McLachlan stuart at lexacorp.com.pg
Tue Jan 18 16:53:03 CST 2005


On 18 Jan 2005 at 14:31, dmcafee at pacbell.net wrote:

> 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
> 

I think that Charlotte talking about stepping through the labels on the 
form and finding out which one was attached to the text box in question.

Sort of:
...
If lblThisLabel.Parent.Name = "txtMyTextBox" then 
MsgBox lblThisLable.Caption
End if
....

-- 
Stuart





More information about the AccessD mailing list