How to update form

  • Thread starter Thread starter eb1mom
  • Start date Start date
E

eb1mom

I have a main form with two subforms. Both subforms are
updated using update queries (good query help received from
here). I have a refresh command button on the main form.
This works but, it would be nice if form would
"automatically" refresh after update. I searched archives
here but, must not be wording my search correctly as I was
unable to find an answer. Can the form be reloaded
automatically? Thank-you
 
In the After Update event of your main form run code to requery the subforms

Private Sub Form_AfterUpdate()
Me.SubForm1.Form.Requery
Me.SubForm2.Form.Requery
End Sub

Keep in mind that this doesn't occur unless/until you save the current
record explicitly or move to a new or previous record which will implicitly
save the record.
 
Thank-you for the code and thanks for the tip about saving
record. Eb1mom
 

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

Back
Top