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
|
|||
|
|||
Numpty Combo Box Questions
Hi all
Just trying to get my head round these combo boxes! I seem to have got the hang of controlling the record display when the down arrow is clicked. Managed to get correct columns visible with captions etc. How do I vary the fields displayed when the combo box is inactive. Once a selection has been made and the user has left the combo box, I would like to display more than one field. Also, is it possible to sort the display order of the records by user selection. I would like the user to be able to re-order the combo box by either of two fields prior to a selection being made. Thanks Phil |
#2
|
|||
|
|||
Numpty Combo Box Questions
You cannot display more than one field in the text box portion of the combo
box. The only time it's possible to display more than one column is when the list is dropped down. To control the order of the records in the combo box, base the combo box on a query that has the appropriate ORDER BY clause. To change the order, change which query you're using as the RowSource property. This can be done in code. -- Doug Steele, Microsoft Access MVP http://www.AccessMVP.com/DJSteele (no e-mails, please!) "TheScullster" wrote in message . uk... Hi all Just trying to get my head round these combo boxes! I seem to have got the hang of controlling the record display when the down arrow is clicked. Managed to get correct columns visible with captions etc. How do I vary the fields displayed when the combo box is inactive. Once a selection has been made and the user has left the combo box, I would like to display more than one field. Also, is it possible to sort the display order of the records by user selection. I would like the user to be able to re-order the combo box by either of two fields prior to a selection being made. Thanks Phil |
#3
|
|||
|
|||
Numpty Combo Box Questions
In the Query, could you not simply make a calculated field using the two
fields, and use it as the bound field of the combobox.? DisplayField:[FirstField] & " " & [SecondField] -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via http://www.accessmonster.com |
#4
|
|||
|
|||
Numpty Combo Box Questions
"Linq Adams via AccessMonster.com" u28780@uwe wrote in message news:a596adfea395e@uwe... In the Query, could you not simply make a calculated field using the two fields, and use it as the bound field of the combobox.? DisplayField:[FirstField] & " " & [SecondField] Thanks Doug and Linq I have resolved the combo box issue by including two separate cbs. Each one updates the same field in the destination table, but one is ordered on (and displays contracts), the other is ordered on and displays enquiries. Usefully, when you alter the cb for a contract selection, the associated enquiry is displayed in the enquiry cb. Not sure how elegant my solution is, but it seems to work. Phil |
Thread Tools | |
Display Modes | |
|
|