Reading text from a control's attached label in Access?

S

SleeplessTexas

When setting focus to an active control, I'm trying to read\extract text from
a label's caption property...but just can't seem to get this piece of the
procedure right programmatically. I'm currently copying the text into the
control's TAG property in order to extract information, but this is tedious
at best when you have a large number of controls to deal with! Has anyone
attempted this and had it work right?
 
M

Matthias Klaey

When setting focus to an active control, I'm trying to read\extract text from
a label's caption property...but just can't seem to get this piece of the
procedure right programmatically. I'm currently copying the text into the
control's TAG property in order to extract information, but this is tedious
at best when you have a large number of controls to deal with! Has anyone
attempted this and had it work right?

try

Me!YourTextControl.Controls("<Name of label>").Caption

HTH

Matthias Kläy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top