Requery Subform two levels Down

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
 
T

Tom van Stiphout

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
 
K

kc-mass

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
 
C

Cathleen

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Requery Subform not working 3
REQUERY SUBFORM 4
Referencing a subform 4
Requery Subforms 1
Requery form 2
Requery Subform A from Subform B 6
requery in subform 1
Subform requery 2

Top