Results 1 to 3 of 3

Thread: Combobox

  1. #1
    Join Date
    Jan 2004
    Location
    ny
    Posts
    16

    Post Unanswered: Combobox

    Hello,
    I'm new to vb

    I need a way to populate a Combobox with only one table name from access db. I would like to spesify that table.
    Hope its possible.

    Thank you.

    I

  2. #2
    Join Date
    Jan 2004
    Location
    India
    Posts
    62
    assume that
    rs is the record set specitying the data from the table and
    combo1 is the combobox.

    dim i as integer
    rs.movefirst
    for i = 1 to rs.recordcount
    loop
    combo1.additem rs.fieldname - actual field name
    rs.movenext
    endloop

    Just check the syntax of FOR
    Regards,

    Rushi

  3. #3
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    Originally posted by Rushi
    assume that
    rs is the record set specitying the data from the table and
    combo1 is the combobox.

    dim i as integer
    rs.movefirst
    for i = 1 to rs.recordcount
    loop
    combo1.additem rs.fieldname - actual field name
    rs.movenext
    endloop

    Just check the syntax of FOR
    You should replace rs.fieldname with rs("fieldname")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •