Yes. Check out the CONTROLS collection. You can enumerate all the controls within an object, and by setting s variable of type CONTROL, examine it's properties such as type, name, value, etc etc..
Hmmmm...... thanks for that, but why isn't ControlType in the list of properties for the object variable?? It works, but how are you supposed to find it if it ain't listed??
Hmmmm back..there's a full page in the Help system on CONTROLTYPE, including an example that iterates through all the controls on a form and changes some of their properties.
To return the TYPE of a control, you should be able to just query it:
Dim f as form, c as control, t as string
set f = Forms!MyForm
Set c = f.TxtName
t = c.Controltype
"t" would now be set to "acTextBox"
Jim Hare
"Remember, you're unique - just like everonone else"
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.