-
displaying info in comboboxes
I have a combo box with 3 columns in it. one of them is invisible(the control value) the other two are simply a number(telling the number of the training session) and the date the session started. I have it set up so that the number is infront of the date, as it looks better in the drop down. Is there a way to get it display the date instead of the number?
Brandon
-
Just change the SQL in the Rowsource property - the user could use a radio button or somesuch to trigger the change.
'air code
Const DATEFIRST = 0
const NUMBERFIRST = 1
select case me.optRowsource
case DATEFIRST
me.cboSession.rowsource = "SELECT keyvalue, SessionDate, SessionNumber FROM table"
case NUMBERFIRST
me.cboSession.rowsource = "SELECT keyvalue, SessionNumber, SessionDate FROM table"
End Select
me.cboSession.requery
I tend to concatenate the 2 pieces of info in cases like this..
SELECT [keyvalue], [SessionNumber] + ' (' + [SessionDate] + ')' as SessionDetails FROM table
Peter
-
I was hopeing to accomplish this feat automaticly. It kind of defeats the purpose if the user has to go out of their way to display information better. But thank you for the idea.
Brandon
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|