Connecting Tech Pros Worldwide Help | Site Map

Requery every subform?

Mike MacSween
Guest
 
Posts: n/a
#1: Nov 12 '05
Dim frm As Form
Dim ctrl As Control
Set frm = Forms!frmProductions
For Each ctrl In frm.Controls
If ctrl.ControlType = acSubform Then
ctrl.Requery
End If
Next ctrl

as a way of requerying every subform (in this case as an after insert)

What does anybody think?

Yours, Mike MacSween


Bas Cost Budde
Guest
 
Posts: n/a
#2: Nov 12 '05

re: Requery every subform?


Mike MacSween wrote:
[color=blue]
> Dim frm As Form
> Dim ctrl As Control
> Set frm = Forms!frmProductions
> For Each ctrl In frm.Controls
> If ctrl.ControlType = acSubform Then
> ctrl.Requery
> End If
> Next ctrl
>
> as a way of requerying every subform (in this case as an after insert)
>
> What does anybody think?
>
> Yours, Mike MacSween
>
>[/color]
Doesnt' me.recalc do that? (and more, indeed)

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Mike MacSween
Guest
 
Posts: n/a
#3: Nov 12 '05

re: Requery every subform?


Well there you go. I never know about recalc. Thanks very much. Yes, it
seems to do exactly what I want.

Cheers, Mike

"Bas Cost Budde" <bas@heuveltop.org> wrote in message
news:c0lnpb$85d$7@news2.solcon.nl...[color=blue]
> Mike MacSween wrote:
>[color=green]
> > Dim frm As Form
> > Dim ctrl As Control
> > Set frm = Forms!frmProductions
> > For Each ctrl In frm.Controls
> > If ctrl.ControlType = acSubform Then
> > ctrl.Requery
> > End If
> > Next ctrl
> >
> > as a way of requerying every subform (in this case as an after insert)
> >
> > What does anybody think?
> >
> > Yours, Mike MacSween
> >
> >[/color]
> Doesnt' me.recalc do that? (and more, indeed)
>
> --
> Bas Cost Budde
> http://www.heuveltop.org/BasCB
> but the domain is nl
>[/color]


Closed Thread