return caption for a control

  • Thread starter Thread starter Question Boy
  • Start date Start date
Q

Question Boy

I am wanting to know is there is a way to list all the control name's on a
form with the associated caption/labels?

I started with

For Each ctl In frm.Controls
sCtls = ctl.Name
Next

but do not know how I can retrieve there labels as well?

Thank you

QB
 
I managed to get the following to work very rapidly, unless someone else has
better code to provide you.

Forms![YourFormName].Form.Controls(ctl.Controls.Item(0).ControlName).Caption
--
Hope this helps,

Daniel Pineault
http://www.cardaconsultants.com/
For Access Tips and Examples: http://www.devhut.net
Please rate this post using the vote buttons if it was helpful.
 
Back
Top