CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: Combo box

  1. #1
    Join Date
    Apr 2001
    Location
    maharashtra,india
    Posts
    12

    Combo box

    I have a subject table (in MS ACCESS) having two fields subject id and subject name. I want both the fields should be displayed in one combo box.

    I want it at run time.
    ie Combobox.Additem (rs("subname")).This displays only the subject name. I want the subject id field also to be displayed in the same combobox

    I will be thankful if someone could solve my problem.




  2. #2
    Join Date
    Apr 2000
    Location
    South Carolina,USA
    Posts
    2,210

    Re: Combo box

    You can concatenate the two fields together into one line in the combobox like so:

    ' example seperates two fields with a couple of blanks.
    Combobox.Additem rs("subname") & " " & rs("subid")




    John G

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

Featured