Could someone please tell me if its possible to make your first listing in a DBCombo "add new" then a line and then the rest after that populated by a recordset.
Any response would be greatly appreciated, thanks,
Wick
Printable View
Could someone please tell me if its possible to make your first listing in a DBCombo "add new" then a line and then the rest after that populated by a recordset.
Any response would be greatly appreciated, thanks,
Wick
i don't think it's possible to do it if the combo is bound to the datasource, but you could add "Add New", then the line and then each record in the recordset manuall, a bit like this
DBCombo.Additem "Add New"
DBCombo.Additem "________"
do while not Recordset.eof
DBCombo.Additem Recordset!Field
Recordset.Movenext
Loop
it seems like a pain, and will hold up te pc while it's running thru the loop (could be a problem if you've lots of rows) but it's the only way i can think of.
There is no AddItem option available to the DBCombo so therefore I think Im screwed, If anyone else can help I would appreciate it.
thanks,
Wick
i suppose that could be seen as a problem
if you use the above example, you could just try a normal combobox, or is there some other more sinister reason for using a dbcombo?
I just went with the normal Combo and it works like a charm. I just wasnt sure how to populate a normal Combo with a field. Your code was the key. Since there will only be a few records in that field, my pc wont hang too badly.
thanks alot,
Wick