Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to refresh data on a form linked to a combo box 1

Status
Not open for further replies.

Heeeeelp

Technical User
Jan 5, 2006
39
CA
Hi Everyone,

I have a Customer form with a combo box that stores company names. If there is a new customer, the user clicks on the add customer button which opens a new form to input the information for a new customer. When the Add Customer screen is closed, the combo box on the Customer form displays the name of the new customer that was added to the database. However, if you select the new name in the combo box, the remaining fields on the form do not change to reflect the new customer's information unless I close the customer form and open it again. Please advise as to how I can refresh the form to reflect the new customer's information without having to close the form and opening it up again. I tried adding a refresh button to the form but this did not work.

Thank you in advance for your help.

Regards,
Tess
 
use me.requery in the afterupdate event of the combobox and onclose event of the new contact form.

Ian Mayor (UK)
Program Error
Always make your words short and sweet. Because you never know when you may have to eat them.
 
Sorry the onclose event should be forms!mainformname.requery because the new contact form still has the focus.

Ian Mayor (UK)
Program Error
Always make your words short and sweet. Because you never know when you may have to eat them.
 
Thank you, problem solved! I appreciate your help Ian.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top