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
|
|||
|
|||
Requery ?
I have a form with customer and account info based on
corresponding tables. I have a combo box displaying all companies but if the company isn't listed, I'd like to add a button that will open a form to enter the new company info. No problem, but when I close the company entry form and return to the Company/account form how can I get the new company to show in my drop down list? Also while I'm here, how can I sort my combobox alphabetically? Thanks for any pointers you can provide. |
#2
|
|||
|
|||
Requery ?
In the OnClose event of the form that allows the person to enter the new
entry, put this code: Private Sub Form_Close() [Forms]![FirstFormName]!ComboBoxName.Requery End Sub To sort the combo box list, use a query as the row source list and include a sorting order on the desired field to sort that field in ascending order. -- Ken Snell MS ACCESS MVP "JK" wrote in message ... I have a form with customer and account info based on corresponding tables. I have a combo box displaying all companies but if the company isn't listed, I'd like to add a button that will open a form to enter the new company info. No problem, but when I close the company entry form and return to the Company/account form how can I get the new company to show in my drop down list? Also while I'm here, how can I sort my combobox alphabetically? Thanks for any pointers you can provide. |
#3
|
|||
|
|||
Requery ?
Thank you very much! You all are great.
-----Original Message----- In the OnClose event of the form that allows the person to enter the new entry, put this code: Private Sub Form_Close() [Forms]![FirstFormName]!ComboBoxName.Requery End Sub To sort the combo box list, use a query as the row source list and include a sorting order on the desired field to sort that field in ascending order. -- Ken Snell MS ACCESS MVP "JK" wrote in message ... I have a form with customer and account info based on corresponding tables. I have a combo box displaying all companies but if the company isn't listed, I'd like to add a button that will open a form to enter the new company info. No problem, but when I close the company entry form and return to the Company/account form how can I get the new company to show in my drop down list? Also while I'm here, how can I sort my combobox alphabetically? Thanks for any pointers you can provide. . |
#4
|
|||
|
|||
Requery ?
You're welcome.
-- Ken Snell MS ACCESS MVP "JK" wrote in message ... Thank you very much! You all are great. |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Requery Method | Nexus | Running & Setting Up Queries | 1 | June 25th, 2004 12:14 PM |
Continuous form requery | Randy Harris | New Users | 0 | May 25th, 2004 10:25 PM |
Requery Combobox | MJ | Running & Setting Up Queries | 7 | May 25th, 2004 11:01 AM |