Setting Default for Dependent ComboBox with Two Columns

state90

Registered User.
Local time
Today, 12:41
Joined
Sep 16, 2014
Messages
65
I have a combobox (CboCCDescription) with two visible columns (Cost Center and Cost Center Description - i.e., 200 - Sales; 300 - Marketing, etc).

I would like to set the default to "ALL" but it is not accepting that as a default. I suspect it is because the combo box is now a two column combobox. Initially, this was a one column combobox for just Cost Center Description and settign the default to "All" was no problem at all.

How do I get this default to "All" now that it is a two column combobox?

Thank you.
 
You need to use the value for whichever is the bound column, presumably the numeric value. Whatever the numeric value is for All.
 
The bound column is column(1) which is the description. Cost Center number is the unbound column. From what you said, shouldn't "All" work? I tried putting that in the combobox default value under Data. Should I use VBA to set the default? If so, how? I do have a series of directions set for when the form loads (The form includes multiple comboboxes as criteria selection options including the CboCCDescription cpombobox in question
 
Can you attach the db here?
 
Too big. It is huge. 800 Mb.

One road I was thinking of going down is that the combo in question (CboCCDescription) is dependent on the selection of the functional roll-up combo (CboFuncRollup). For example, if Sales is selected in the functional roll-up then only the Sales related cost center options are available for selection in the CboCCDescription combo. Further, CboCCDescription is based on a query. So, when CboFuncRollup is "All" the only possible selection for CboCCDescription is "All" (Because it is based on two columns it actually looks something like " /All"). Is there a way to simply have the result of that query as the default for CboCCDescription?
 
PBaldy, Thank you for your help. I figured it out based on something you had written when you referenced whether the first column was bound or unbound. I had the second column as the bound column. I had read elsewhere that if the default value is in the data of the bound column then the default should work. I re-created the combobox with the first column as the bound column and used "All" as the default and for some reason it worked. The strange part is that it is the second column that lists "All" as part of the data so I am unclear as to why it worked...but it did. Thank you as usual for your help!
 
Glad you got it sorted.
 

Users who are viewing this thread

Back
Top Bottom