Where do I put the REQUERY command?

L

laskowv

Lets say I have a "Customer" form which contains a Page; of which contains
several subforms. The first subform is a query of records of employees for
that customer in a datasheet view. The Page also has an add new employee
button which allows the user to add a new employee for that Customer via a
Pop-up form.

Now, after the employee is added and the pop-up form closes, to what element
would the "Requery" command GO? I get confused on the "hierarchy" of Access.
 
R

RipperT

Use the wizard to create a close button to close the add new employee form
and right after Docmd.Close put

Forms!NameOfYourSubForm.Requery

If that doesn't work, try

Forms!NameOfYourMainForm!NameOfYourSubForm.Requery

HTH,

Rip
 

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