[AccessD] Cycling through subform controls

Charlotte Foust cfoust at infostatsystems.com
Thu May 22 12:02:24 CDT 2003


Subforms are not members of the collection of open forms, so you can't
use the Forms(formname) syntax to reference them.  Actually, you don't
need it in a form either.  In both cases, you can just use this:

For Each ctlC in Me.Controls

Charlotte Foust

-----Original Message-----
From: Dale Kalsow [mailto:dkalsow at yahoo.com] 
Sent: Thursday, May 22, 2003 8:35 AM
To: accessd at databaseadvisors.com
Subject: [AccessD] Cycling through subform controls


I have the following line of code:
For Each ctlC In Forms(Me.Name)

It works great if it is the main form but if I try and use it in a
subform it throws an error.

Does anyone know the correct line of code to use in a subform.  I am
trying to have the subform cycle though its controls.
Thanks!
Dale Kalsow


Do you Yahoo!?
The New Yahoo! Search - Faster. Easier. Bingo.


More information about the AccessD mailing list