If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Combobox not updating?
I have a FORM for purchase orders. On this form there is a Customer ID field
whose values are listed in a combobox whose contents are pulled from a Customer table - this ensures only customers in the database are used in the purchase order form. I also have a button "NEW CUSTOMER" which opens the Customer table at a new record for a new record to be entered. The problem is, when a new customer is entered, saved, and the customer table closed, the combobox on the purchase order form is not automatically updated, so the new customer's id does not appear in the list. Having to close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a required field, if you try save the record with no entry, then it clearly fails. Is there any way of forcing the combobox to update upon closing the other form? |
#2
|
|||
|
|||
Combobox not updating?
Yes, use the OnClose event to go to the form that has the combo and Requery.
-- Build a little, test a little. "Farkyss" wrote: I have a FORM for purchase orders. On this form there is a Customer ID field whose values are listed in a combobox whose contents are pulled from a Customer table - this ensures only customers in the database are used in the purchase order form. I also have a button "NEW CUSTOMER" which opens the Customer table at a new record for a new record to be entered. The problem is, when a new customer is entered, saved, and the customer table closed, the combobox on the purchase order form is not automatically updated, so the new customer's id does not appear in the list. Having to close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a required field, if you try save the record with no entry, then it clearly fails. Is there any way of forcing the combobox to update upon closing the other form? |
#3
|
|||
|
|||
Combobox not updating?
Karl, what macro code would be needed to achieve this? If you can suggest it
using placeholders for the names of the fields, i can keep my hair where it is on my head "KARL DEWEY" wrote: Yes, use the OnClose event to go to the form that has the combo and Requery. -- Build a little, test a little. "Farkyss" wrote: I have a FORM for purchase orders. On this form there is a Customer ID field whose values are listed in a combobox whose contents are pulled from a Customer table - this ensures only customers in the database are used in the purchase order form. I also have a button "NEW CUSTOMER" which opens the Customer table at a new record for a new record to be entered. The problem is, when a new customer is entered, saved, and the customer table closed, the combobox on the purchase order form is not automatically updated, so the new customer's id does not appear in the list. Having to close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a required field, if you try save the record with no entry, then it clearly fails. Is there any way of forcing the combobox to update upon closing the other form? |
#4
|
|||
|
|||
Combobox not updating?
I did not test this --
OpenForm -- your form with combo GoToControl - combo ReQuery -- Build a little, test a little. "Farkyss" wrote: Karl, what macro code would be needed to achieve this? If you can suggest it using placeholders for the names of the fields, i can keep my hair where it is on my head "KARL DEWEY" wrote: Yes, use the OnClose event to go to the form that has the combo and Requery. -- Build a little, test a little. "Farkyss" wrote: I have a FORM for purchase orders. On this form there is a Customer ID field whose values are listed in a combobox whose contents are pulled from a Customer table - this ensures only customers in the database are used in the purchase order form. I also have a button "NEW CUSTOMER" which opens the Customer table at a new record for a new record to be entered. The problem is, when a new customer is entered, saved, and the customer table closed, the combobox on the purchase order form is not automatically updated, so the new customer's id does not appear in the list. Having to close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a required field, if you try save the record with no entry, then it clearly fails. Is there any way of forcing the combobox to update upon closing the other form? |
#5
|
|||
|
|||
Combobox not updating?
As the form is normally open anyway, but underneath the current one, can you
refer to a specific existing open form instead of using OPENFORM? "KARL DEWEY" wrote: I did not test this -- OpenForm -- your form with combo GoToControl - combo ReQuery -- Build a little, test a little. "Farkyss" wrote: Karl, what macro code would be needed to achieve this? If you can suggest it using placeholders for the names of the fields, i can keep my hair where it is on my head "KARL DEWEY" wrote: Yes, use the OnClose event to go to the form that has the combo and Requery. -- Build a little, test a little. "Farkyss" wrote: I have a FORM for purchase orders. On this form there is a Customer ID field whose values are listed in a combobox whose contents are pulled from a Customer table - this ensures only customers in the database are used in the purchase order form. I also have a button "NEW CUSTOMER" which opens the Customer table at a new record for a new record to be entered. The problem is, when a new customer is entered, saved, and the customer table closed, the combobox on the purchase order form is not automatically updated, so the new customer's id does not appear in the list. Having to close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a required field, if you try save the record with no entry, then it clearly fails. Is there any way of forcing the combobox to update upon closing the other form? |
#6
|
|||
|
|||
Combobox not updating?
Opening the form will just bring it to the top, so then you will also use
OpenForm on the other one to bring it back to the top. -- Build a little, test a little. "Farkyss" wrote: As the form is normally open anyway, but underneath the current one, can you refer to a specific existing open form instead of using OPENFORM? "KARL DEWEY" wrote: I did not test this -- OpenForm -- your form with combo GoToControl - combo ReQuery -- Build a little, test a little. "Farkyss" wrote: Karl, what macro code would be needed to achieve this? If you can suggest it using placeholders for the names of the fields, i can keep my hair where it is on my head "KARL DEWEY" wrote: Yes, use the OnClose event to go to the form that has the combo and Requery. -- Build a little, test a little. "Farkyss" wrote: I have a FORM for purchase orders. On this form there is a Customer ID field whose values are listed in a combobox whose contents are pulled from a Customer table - this ensures only customers in the database are used in the purchase order form. I also have a button "NEW CUSTOMER" which opens the Customer table at a new record for a new record to be entered. The problem is, when a new customer is entered, saved, and the customer table closed, the combobox on the purchase order form is not automatically updated, so the new customer's id does not appear in the list. Having to close and reopen the record manually isn't ideal, and as the CUSTOMER ID is a required field, if you try save the record with no entry, then it clearly fails. Is there any way of forcing the combobox to update upon closing the other form? |
Thread Tools | |
Display Modes | |
|
|