Forms Question

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
 
R

Rick Brandt

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
 

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