Registrations are now open. Join us today!
There is still a lot of work to do on the wiki yet! More information about editing can be found here.
Already have an account?

Microsoft KB Archive/101082

From BetaArchive Wiki

ACC1x: How to Requery a Combo Box on Subform


The information in this article applies to:

  • Microsoft Access versions 1.0, 1.1
  • Microsoft Access Distribution Kit, version 1.1


This article describes a macro that will requery a combo box control on a subform. This macro is useful for a combo box that is based on a query that references the main form and thus should be requeried whenever you change records on the main form.


The following sample macro will requery the combo box:

   Macro Name     Action          Defined Below
   RequeryCombo   GoToControl     1
                  GotoControl     2
                  Requery         3

   RequeryCombo Actions
   1. GotoControl
         ControlName: <Subform ControlName>
   2. GotoControl
         ControlName: <ComboBox ControlName>
   3. Requery
         ControlName: <ComboBox ControlName> 

When this macro is run, it will requery the combo box. If you want the combo box to be requeried each time you change records in the main form, add this macro to the OnCurrent property of the main form.


For more information on form events, search for "events" then "events for forms" using the Microsoft Access Help menu.

Additional query words: macros forms

Keywords : kbusage
Issue type : kbhowto
Technology :

Last Reviewed: November 4, 2000
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.