Numpty Combo Box Questions

T

TheScullster

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
 
D

Douglas J. Steele

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.
 
L

Linq Adams via AccessMonster.com

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]
 
T

TheScullster

Linq Adams via AccessMonster.com said:
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top