Hi,
Can anyone tell me how the initial value displayed in Combo Box is
determined when a form is opened?
I am loading the dropdown from one field ("CategoryName") of a table, with
"ORDER BY [CategoryName]". The values in the dropdown are loaded in the
correct order, but the initial value is not the first row of the dropdown as
I expected.
The field "CategoryName" is not the primary key for the table -- the PK is
an Autonum field. I don't know if it is coincidence, but the CategoryName
value loaded corresponds to the record with "1" in the autonum field
(currently I only have about three records in the table anyway). So is the
initial value determined by the PK record? (I am not using ColumnHeads --
if I do, the initial value seems to be random.)
And if I can ask a secondary question, I would like the initial value in the
Combo Box Text field to be an instruction rather than a valid value, to
force the user to make a selection from the dropdown (eg "<Select from
Dropdown>"). The only solution I can see is include the instruction as a
valid record in the table, arrange for it to be displayed as the initial
value (hence my original question above), and then programmatically deal
with it if the user selects this value (ie, error message).
I am sure that there must be a simpler way to set this up. Any help
appreciated.
--
Cheers,
Lyn.