In an unbound Combo box can the default item be the first item in the list ?
I'm trying
But the last instruction is ignored.Code:For i = 1 To UBound(Files) Form_frmtest.cboA.AddItem Files(i) Next Form_frmtest.cboA.DefaultValue = files(1)
In an unbound Combo box can the default item be the first item in the list ?
I'm trying
But the last instruction is ignored.Code:For i = 1 To UBound(Files) Form_frmtest.cboA.AddItem Files(i) Next Form_frmtest.cboA.DefaultValue = files(1)
I just tested with combobox that uses query for source. Setting DefaultValue to first item ID works, item is selected.
But why bother with DefaultValue - just set value of combobox.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
try
Code:Form_frmtest.cboA.DefaultValue = Form_frmtest.cboA.ItemData(0)
If this helped, please click the star * at the bottom left and add to my reputation- Thanks
June Unfortunately that had no effect. There's nothing in the combo box until the dropdown is clicked.
Can this work, or is it a lost cause. In which case I can try writing the data to a table and use a query as row source.
Likewise moke, no change. I can see ItemData(0) though.
I revised my previous answer, perhaps after you first read.
Initial test with UNBOUND combobox with ValueList exhibits same results you encountered.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
Thanks June , that is working great - but now I see another problem. If the text doesn't fit it is truncated.
Can it wordwrap? Or failing that, can I know it will? Then I can work out some way to deal with it.
Truncated in dropdown list? Will not wrap.
Will wrap in the text box part if you increase height.
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
What I'm displaying varies and can be any length.
All that I'll know is the number of characters. But the space they need varies because of the proportional spacing.
What do people do to resolve this?
Use a fixed width font?But the space they need varies because of the proportional spacing.
What do people do to resolve this?
The more we hear silence, the more we begin to think about our value in this universe.
Paraphrase of Professor Brian Cox.