Update combo from table

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi, I am working on a database I did not create, always fun. I have a form
with a combo box on it for client name. There is a button to add a new
client. When you click on it, it brings up the table and you enter in all
the client information. This particular form only needs the client name. Is
there a way, when you close the table, to have the client name combo box
update so the user doesn't have to reload the whole form? What happens is
the user will fill in a lot of information on this form, realize they need to
add a client, do that, then have to re-type everything because they had to
reload the whole form.

Thanks for your help!
 
This particular form only needs the client name. Is
there a way, when you close the table, to have the client name combo box
update so the user doesn't have to reload the whole form?

Sure. Add a line in the button's Click event, or the afterupdate event of the
form for adding the client information, to Requery the combo:

Forms!NameOfYourForm!NameOfYourCombo.Requery

John W. Vinson [MVP]
 
Thanks for your help!

John W. Vinson said:
Sure. Add a line in the button's Click event, or the afterupdate event of the
form for adding the client information, to Requery the combo:

Forms!NameOfYourForm!NameOfYourCombo.Requery

John W. Vinson [MVP]
 
I woudl reccomend me.ControlName.requery

I rename forms so often it makes me sick to hard-code form names in VBA
 
Back
Top