|
-
Jul 12th, 2000, 10:24 AM
#1
Thread Starter
Member
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
-
Jul 12th, 2000, 10:31 AM
#2
Hyperactive Member
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.
-
Jul 12th, 2000, 10:47 AM
#3
Thread Starter
Member
Thanks Jimbob but...
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
-
Jul 12th, 2000, 10:54 AM
#4
Hyperactive Member
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?
-
Jul 12th, 2000, 11:00 AM
#5
Thread Starter
Member
Thanks Jimbob...
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|