Hi Candy,
You haven't stated a version but try this code...
LAYOUT
GRID
{
[f01 ]
[f02 ]
[f03 ]
}
END
END
ATTRIBUTES
COMBOBOX f01 = formonly.combo1, NOT NULL, ITEMS=(NULL,"Y","N");
COMBOBOX f02 = formonly.combo2, NOT NULL, ITEMS=((NULL,"Please select an item..."),("Y","Yes"),("N","No"));
COMBOBOX f03 = formonly.combo3, NOT NULL;
MAIN
DEFINE combo1, combo2, combo3 STRING
DEFINE l_cb ui.ComboBox
OPEN WINDOW w WITH FORM "20081118a"
INPUT combo1, combo2, combo3 WITHOUT DEFAULTS FROM combo1, combo2, combo3
BEFORE INPUT
LET l_cb = ui.ComboBox.forName("combo3")
CALL l_cb.addItem(NULL,"Please select an item...")
CALL l_cb.addItem("Y","Yes")
CALL l_cb.addItem("N","No")
END INPUT
END MAIN
You want NULL as a valid value so just remove the NOT NULL attribute from the .per. (I've left it in to show the functionality possible)
I couldn't find it anywhere in the release notes as to what version it was introduced but at one stage you couldn't put NULL in the ITEMS list. If you find that, try with "" instead of NULL in the ITEMS attribute e.g. ITEMS=("","Y","N") etc
Hope that helps,
Reuben