Prev: How does the tax field work in the transaction template
Next: Pass infomration from a form to a report...
From: TheScullster on 26 Mar 2010 07:22 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
From: Douglas J. Steele on 26 Mar 2010 07:50 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" <phil(a)dropthespam.com> wrote in message news:Bqydne0_T_B6BTHWnZ2dnUVZ8k6dnZ2d(a)eclipse.net.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 >
From: Linq Adams via AccessMonster.com on 26 Mar 2010 10:28 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
From: TheScullster on 26 Mar 2010 11:34
"Linq Adams via AccessMonster.com" <u28780(a)uwe> wrote in message news:a596adfea395e(a)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 |