Requery(?) subform records

D

Dave

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)
 
Top