Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Help Help Help Me in Combo,,Anyone

Help Help Help Me in Combo,,Anyone

Scheduled Pinned Locked Moved Visual Basic
helpdatabase
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • H Offline
    H Offline
    Het2109
    wrote on last edited by
    #1

    I have filled Combobox value by setting DataSource property, giving Display Member and Value Member, for a particular Table fields in Access-2000 database. I selectd some value of combobox. now when i load that form again, i want to set the previously selected value of combobox. have tried using combobox1selectedvalue = code, also tried out by setting combobox1.text, combobox1.selectedtext, but none of them is working. Its very important will be thankful and grateful if anyone can pull me out of this problem. Thanx :)Be Humble in Victory and Strong in Defeat.:) -Het

    J 2 Replies Last reply
    0
    • H Het2109

      I have filled Combobox value by setting DataSource property, giving Display Member and Value Member, for a particular Table fields in Access-2000 database. I selectd some value of combobox. now when i load that form again, i want to set the previously selected value of combobox. have tried using combobox1selectedvalue = code, also tried out by setting combobox1.text, combobox1.selectedtext, but none of them is working. Its very important will be thankful and grateful if anyone can pull me out of this problem. Thanx :)Be Humble in Victory and Strong in Defeat.:) -Het

      J Offline
      J Offline
      John Kuhn
      wrote on last edited by
      #2

      In which environment are you working?

      H 1 Reply Last reply
      0
      • J John Kuhn

        In which environment are you working?

        H Offline
        H Offline
        Het2109
        wrote on last edited by
        #3

        HI there i am working in VB.Net, it would be nice if u can suggest me way out. thanx :)Be Humble in Victory and Strong in Defeat.:) -Het

        1 Reply Last reply
        0
        • H Het2109

          I have filled Combobox value by setting DataSource property, giving Display Member and Value Member, for a particular Table fields in Access-2000 database. I selectd some value of combobox. now when i load that form again, i want to set the previously selected value of combobox. have tried using combobox1selectedvalue = code, also tried out by setting combobox1.text, combobox1.selectedtext, but none of them is working. Its very important will be thankful and grateful if anyone can pull me out of this problem. Thanx :)Be Humble in Victory and Strong in Defeat.:) -Het

          J Offline
          J Offline
          John Kuhn
          wrote on last edited by
          #4

          OK, I created a new Access database with one table, called "States". Then I created a new form, with a ComboBox called cbStates. I added an OleDbConnection and OleDbDataAdapter to the form, and generated a DataSet called dsStates. In the Load of the form, I did this:

          Private Sub Form1\_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
              daStates.Fill(dsStates, "States")
              cbStates.SelectedValue = "CA"
          End Sub
          

          This seems to work correctly. What is the difference between this scenario and what you are trying to do?

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups