Requery(?) subform records

G

Guest

On a Continuous View subform, have a command button that opens a new form
that adds records (with more detail than can be shown on the subform) to the
subform file. After closing this new form, I need to Requery(?) the subform
to show the added records. Syntax & placement help please!
 
V

Van T. Dinh

Are you opening the 2nd Form (for data entry) using acDialog mode or normal
mode?

If acDialog, you can requery right after the DoCmd.OpenForm statement since
the code (in the original Form / Subform) is suspended until the 2nd Form is
closed.

If normal, I guess you can used the Form_AfterInsert Event of the 2nd Form.
The statement should be something like:

Forms!MainForm!SubformCONTROL.Form.Requery

Note: you need to use the name of the SubForm*Control* which may be
different from the name of the Form being used as the Subform.

HTH
Van T. Dinh
MVP (Access)
 

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

subform requery 3
Requery unbound textbox 1
Requery a background form 2
Requery subform 2
Requery listbox 1
SubForm record redisplay 1
Access Main form/Subform Navigation 0
Refreshing a subform 3

Top