Julie has attended:
Access Advanced course
Access VBA course
VBA coding to refresh a subform
I have a form with an attached subform (which is in datasheet view). I need the subform to refresh automatically when the focus shifts back to the main form. The only way i have found to do this so far is to close and reopen the whole form which is a bit jerky for the user.
Is there any command that can do this?
RE: VBA coding to refresh a subform
Try adding the following code to an event procedure on the GOTFOCUS Event of the entire form.
Private Sub FormName_GotFocus()
Me.Refresh
End Sub