"LAS" <(E-Mail Removed)> wrote in
news:i9d53c$alr$(E-Mail Removed):
> I have a loop (see below) that references all the fields in a
> form. Is it possible to restrict this to the detail section of
> the form?
>
> For Each fld In frmSomeForm.Fields
> rstSomeRst(fld.Name) = frmSomeForm(fld.Name)
> Next fld
I know you don't need the answer any longer, but you can do this:
For Each ctl In frmSomeForm.Section(acDetail).Controls
...
Next ctl
(the named constants for sections are actually rather hard to find
they are:
acDetail
acFooter
acGroupLevel1Footer
acGroupLevel1Header
acGroupLevel2Footer
acGroupLevel2Header
acHeader
acPageFooter
acPageHeader
These can be found by opening the Object Browser in the VBE and
searching for the acSection enum definition)
--
David W. Fenton
http://www.dfenton.com/
contact via website only
http://www.dfenton.com/DFA/