Forms Question

  • Thread starter Thread starter nathan sanders
  • Start date Start date
N

nathan sanders

Greetings Guru's

I have a database which I have written that is used to generate invoices for
customers of our auto repair business.

On the Jobs form, there is a combo box for looking up and retrieving the
customers details. I have added a button to open the AddCustomer form if
the customer is a new one.

This all works fine except that I have to close the jobs form in order for
the new customer to appear in the combo box.

I am sure this can be overcome, but i do not know how.

Any help would be wonderful.

Thanks

Nathan
 
nathan said:
Greetings Guru's

I have a database which I have written that is used to generate
invoices for customers of our auto repair business.

On the Jobs form, there is a combo box for looking up and retrieving
the customers details. I have added a button to open the AddCustomer
form if the customer is a new one.

This all works fine except that I have to close the jobs form in
order for the new customer to appear in the combo box.

I am sure this can be overcome, but i do not know how.

Any help would be wonderful.

Open the AddCustomer Form with the acDialog option and then issue a Requery on
the ComboBox immediately on the next line. The acDialog option will pause your
code until the AddCustomer form is closed, then the Requery will refresh your
ComboBox so the new entry will show up.

DoCmd.OpenForm "AddCustomer",,,,,acDialog
Me.ComboBoxName.Requery
 
Back
Top