Results 1 to 5 of 5

Thread: Could someone please tell me...

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    34

    Question

    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

  2. #2
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    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.


  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    34

    Unhappy 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

  4. #4
    Hyperactive Member
    Join Date
    Apr 2000
    Location
    Isle of Man
    Posts
    276
    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?

  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    34

    Talking 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
  •  



Click Here to Expand Forum to Full Width