Combo Box binding

BrettM

just a pert, "ex" to come
Local time
Tomorrow, 07:43
Joined
Apr 30, 2008
Messages
134
I have bound the control to the second column of a combo box as it is used to fill a text box. I still want the combo box to have a default value but it will only display if I set the bound column to the first column. Any ideas here?
 
I beleive the issue is with the key field. Say one of the two columns is a key column and the other is not. When you create a combo box that displays both columns only the key column is stored in the table. Even if you create a combo box that displays only the non-key column, the key column is stored in the table. At least that's how I've seen it work. I've not played with this for some time but if you were to create the table without keys it may work how you want it to. If you set your default value to a value that exists in the key column you should see the result of the second column in the drop-down (when the control source is the second column).
 
Combo Box Binding

The combo box is set to only display column 1 however column 2 is needed to be displayed in a text box. As an example...

column1 Column2
Xmas Santas little helpers are coming
Easter The bunny is bringing eggs
Sunday All busy people should rest

The problem is that the combo box is initially blank when the bound column is 2 and I need the box to say "Select one of the following" by default.

Regards Brett
 
I believe it would be best to add "Select one of the following" as a record in the table and add a numbering field to sort the table when you create your drop-down and make "Select one of the following" the #1 record. Then the "Select one of the following" option will be at the top making it the first choice. I've tried assigning a default value to a combo box in the past to no avail as it seems to attempt storing the data in the underlying table. Just don't give the #1 record a related value in column two and it should work.
 
Combo box binding

I tried that however the box still initially appears blank. When you click the drop down the first entry says "select one of the following". A bit late then...

Probably the only solution is to make the field label speak the obvious "Select one of the following".

Thanks for your input though. Was appreciated.
 

Users who are viewing this thread

Back
Top Bottom