How to update form

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
 
R

Reggie

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