Requery Subform two levels Down

  • Thread starter Thread starter kc-mass
  • Start date Start date
K

kc-mass

I have a form which is two sub levels down

The top level form is "frmTabs"

The first sublevel is "frmTracking2"

The second sublevel is "frmProviderNo"

The forms data source for the above form is "tblProviderNo"

I want to requery the field "ProviderNo".

I have tried several forms for the expression - most recently:

" Docmd.Requery
Forms!frmTab.frmTracking2.Form!frmProviderNo!ProviderNo"

I get the error:
"Microsoft Access can't find the field 'frmProviderNo' referred to
in your expression"

Can someone give me the correct syntax?

Thx
 
On Thu, 29 Oct 2009 08:02:59 -0400, "kc-mass"
<connearney_AT_comcast_DOT_net> wrote:

The syntax is:
forms!myForm1!mySubformcontrol1.Form!mySubformcontrol2.Form!myControl

Note that I am referencing the subform control names; these can be
different from the SourceObject properties.

-Tom.
Microsoft Access MVP
 
Thanks

Tom van Stiphout said:
The syntax is:
forms!myForm1!mySubformcontrol1.Form!mySubformcontrol2.Form!myControl

Note that I am referencing the subform control names; these can be
different from the SourceObject properties.

-Tom.
Microsoft Access MVP
 
If the control you want to requery is on the subform, I think you can just use:

Me.ProviderNo.Requery

You could put it in the subform's On Current event.

Hope that helps!
 
Back
Top