Code Examples For RunCommand Constants

Refresh Subform

acCmdRefreshPage

This code was provided by Brandon Sheen who gives the following explanation of how he uses it

How I use it is I have a form with a subform. The form has combo boxes that add criteria to the query that runs the subform. If I just try to put a Requery on the OnChange of the combo boxes it won't automatically update the subform, however, if I put RefreshPage on the OnChange it will automatically refresh the entire page as soon as I make a selection.

'***************** Code Start *******************

Private Sub Combo6_Change()

  DoCmd.RunCommand acCmdRefreshPage

End Sub

'****************** Code End ********************