When to requery a combo

  • Thread starter Thread starter bg_ie
  • Start date Start date
B

bg_ie

Hi,

I have a combo on my form where the user can select from a list of
names. I also have a button which onpens a form where the user can add
or delete names. This is the code I'm using -

Private Sub CommandAddNewName_Click()
DoCmd.OpenForm "frmPerson"
End Sub

Private Sub Form_Activate()
comboBoxAuthorID.Requery
End Sub

Am I correct to use Form_Activate() to update the combo? I'm thinking
there is a better way...

Thanks,

Barry.
 
Open the form as dialog, that will pause the code until the form is closed,
and then requery the combo

Private Sub CommandAddNewName_Click()
DoCmd.OpenForm "frmPerson" , , , , , AcDialog
Me.comboBoxAuthorID.Requery
End Sub
 
Back
Top