Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Retrieving a form's controls through the forms collection

Status
Not open for further replies.

LilAmyRae

Programmer
Sep 28, 2001
7
0
0
US
I would appreciate any help available on this. I am writing an application, in which a form's controls are set at runtime by any one of a number of outside templates. I'm curious to know, if anyone knows how I can obtain the list of controls on a form, by referencing the form through the forms collection (I know the form name and index in the collection, and, armed with this info, I want to obtain what controls are on the form). I've done some searching on this, but am apparently formulating my search criteria poorly, as I can't find much.


Thanks in advance for your responses! LilAmyRae
 
I feel silly. Just after this posting, I found what I needed. (Isn't that the way it always works? ;) )I will share it, as maybe others can use this info too.

Forms(i).Controls(j).Name will net you the name of the control at index j on form at index i

LilAmyRae
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top