Requery a subform

G

Guest

Hello,

In my application I have a form let say "frmContacts". Record Source
[tblContacts], with Primary Key [ContactID].
In this form I have a subform "frmContactFunctions". Record Source
[tblContactFunctions], with Primary Key [ContactFunctionsID] and Foreign Key
[ContactID].
The two forms are linked with Link Child Fields [ContactID] and Link Master
Fields [ContactID].

Starting from the form "frmContacts" (without closing it) I can start an
other form called "frmContactsEdit" to edit a contact and its functions.
When via form "frmContactsEdit" any change has been saved to
tblContactFunctions (new functions linked to a contact or functions deleted
from a contact) I need to requery the subform "frmContactFunctions", so I can
see the changes there.

I use this code to do that:
Forms("frmContacts").frmContactFunctions.Form.Requery
in the form "frmContactsEdit"
But I get an error.

Forms("frmContacts").frmContactFunctions.Requery
I also get an error.

Not sure if
Forms("frmContacts").Requery or Forms("frmContacts").Form.Requery will do
the job? And what is the difference between these two?

Thanks for you help
 
G

Guest

hi;
i try all codes, and run, i have no problem. did you write code on Close
Form event of "frmContactsEdit" ? May be, you write wrong form name. also i
have an example, if you need.

Best Regards;
Özcan ELMALI
(e-mail address removed)
 

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

Top