Michael Maddison
michael at ddisolutions.com.au
Thu Jul 20 07:01:05 CDT 2006
Hi Paul, Not much traffic because VB6 is on the way out. If you can't find anything in google then I think you are out of luck. #1 VB doesn't have a Forms collection like Access does. You could create a collection of forms but you would need to add them manually... And if your going to do that then theres really no need ;-))) Scratch #1 #2 Vb controls are not usually bound. It is possible using the 'data controls' but back when they were introduced the Hard core programmers scoffed at binding controls so not many people used em. Now in .Net everything is bound...lol I'll assume that your controls are bound and have data in the DataField property. No controls collection I'm afraid either. Control arrays yes, but doubt that will help you... What I would do is open the frm file for each form and parse the text looking for DataField. Or I would give up :-) cheers Michael M -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of paul.hartland at fsmail.net Sent: Thursday, 20 July 2006 9:17 PM To: accessd Subject: [AccessD] OT - VB6 Loop Through All Forms & Controls Importance: High To all, Don't seem to be getting many messages through from the VB group for some reason which is why I have posted this question here. I have a VB6 app, with lots of forms and lots of contols on each form. What I want to do is write a quick function that will loop through every form and every control on that form and return the data field that the control is using. Can anyone help me on this with sample code or point me to a website. Thanks in advance Paul Hartland -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com