Requery Subform from another Form

  • Thread starter Thread starter David Ehrenreich
  • Start date Start date
D

David Ehrenreich

How can I requery a subform in a another "file" that has a
linked table. I know how to do it if all the forms are in
the same file

Private Sub Form_AfterUpdate()
If CurrentProject.AllForms("StudentLookup").IsLoaded Then

Forms![studentlookup]![VisitsWindowSbfrm].Requery

End If

End Sub

A sign-in form is located in one file thta has a linked
table and the studentlookup, and VisitsWindowSbfrm are in
another.

Any help would be great
thank you
David Ehrenreich
 
Hello,
Thank you for your help, but it didnt work. I think the
problem is because the forms are not in the same file.
When all the forms are in the same file it works fine. We
have several computers that have seperate mdf files that
are linked to certain tables. All the tables are in one
mdf file.

Any ideals?

Thank you so far,
David Ehrenreich
-----Original Message-----
Try:
Forms![studentlookup]![VisitsWindowSbfrm].Form.Requery

If the ".Form" bit is new, see:
http://allenbrowne.com/casu-04.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

How can I requery a subform in a another "file" that has a
linked table. I know how to do it if all the forms are in
the same file

Private Sub Form_AfterUpdate()
If CurrentProject.AllForms("StudentLookup").IsLoaded Then

Forms![studentlookup]![VisitsWindowSbfrm].Requery

End If

End Sub

A sign-in form is located in one file thta has a linked
table and the studentlookup, and VisitsWindowSbfrm are in
another.

Any help would be great
thank you
David Ehrenreich


.
 
Not sure about that.

It would be worth double-checking that the Name of the subform control is in
fact "VisitsWindowSbfrm". You are aware that its Name can be different from
its SourceObject (i.e. the name of the form that you load into the subform
control)?

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

Hello,
Thank you for your help, but it didnt work. I think the
problem is because the forms are not in the same file.
When all the forms are in the same file it works fine. We
have several computers that have seperate mdf files that
are linked to certain tables. All the tables are in one
mdf file.

Any ideals?

Thank you so far,
David Ehrenreich
-----Original Message-----
Try:
Forms![studentlookup]![VisitsWindowSbfrm].Form.Requery

If the ".Form" bit is new, see:
http://allenbrowne.com/casu-04.html

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

How can I requery a subform in a another "file" that has a
linked table. I know how to do it if all the forms are in
the same file

Private Sub Form_AfterUpdate()
If CurrentProject.AllForms("StudentLookup").IsLoaded Then

Forms![studentlookup]![VisitsWindowSbfrm].Requery

End If

End Sub

A sign-in form is located in one file thta has a linked
table and the studentlookup, and VisitsWindowSbfrm are in
another.

Any help would be great
thank you
David Ehrenreich


.
 
Back
Top