Code Examples

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 ********************

© 1998 - 2011 Terry Wickenden TKW Design Site developed maintained and hosted by TKW Design. This site is best viewed at 1024 x 768. Optimised for Firefox.