[AccessD] Iterating Controls

Arthur Fuller artful at rogers.com
Sun Mar 9 09:04:00 CST 2003


Here's a little snippet from some code I'm writing:

<code>

    'Walk through forms

    For Each Frm In db.AllForms

        DoCmd.OpenForm Frm.name, acDesign

        a.WriteLine "Form: " & Frm.name

        'Walk through controls

        For Each ctl In Frm.Controls

            With ctl

</code>

 

The code errors on the second last line, complaining that "object doesn't
support this property or method". What's the right way to reference the
collection of controls on a form and then walk the collection? 

I'm still hunting as I write this, so I may post my own reply.

TIA,

Arthur

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://databaseadvisors.com/pipermail/accessd/attachments/20030309/f652af95/attachment.html>


More information about the AccessD mailing list