When to requery a combo

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.
 
G

Guest

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top