I have a form (frmQuoteFormEdit) on that form there is a combobox (cboCustomers) that has a list of our customers that it gets from an SQL Query in it’s Row Source:
SELECT tblCustomers.Abbreviation, tblCustomers.Customer_Name FROM tblCustomers ORDER BY tblCustomers.Customer_Name;
Next to that combobox I have a button for adding a new customer. When that button is clicked a new form (frmNewCustomer) with the Control Source of tblCustomers to a new Record is opened. After entering a new customer the user clicks on the OK button that closes frmNewCustomer and takes the user back to frmQuoteFormEdit. In the code for the OK button I have this:
Forms!frmQuoteFormEdit![cboCustomers].Requery
I've also tried
Forms!frmQuoteFormEdit.cboCustomers.Requery
I was hoping that the code would requery the combobox so that it contains the new customer but it doesn't. If I check the table it has actually been added. If I close frmQuoteFormEdit and open it again the new customer is there. I just can't figure out why the combobox isn't updating without closing the form. Any ideas?
-al
SELECT tblCustomers.Abbreviation, tblCustomers.Customer_Name FROM tblCustomers ORDER BY tblCustomers.Customer_Name;
Next to that combobox I have a button for adding a new customer. When that button is clicked a new form (frmNewCustomer) with the Control Source of tblCustomers to a new Record is opened. After entering a new customer the user clicks on the OK button that closes frmNewCustomer and takes the user back to frmQuoteFormEdit. In the code for the OK button I have this:
Forms!frmQuoteFormEdit![cboCustomers].Requery
I've also tried
Forms!frmQuoteFormEdit.cboCustomers.Requery
I was hoping that the code would requery the combobox so that it contains the new customer but it doesn't. If I check the table it has actually been added. If I close frmQuoteFormEdit and open it again the new customer is there. I just can't figure out why the combobox isn't updating without closing the form. Any ideas?
-al