how to clear data in the Data Combo box at runtime

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sunilkds
    New Member
    • Feb 2008
    • 16

    how to clear data in the Data Combo box at runtime

    I want code for how to clear values in the datacombo box (not combo box) at run time.

    Plz give corect method or solution
  • lee123
    Contributor
    • Feb 2007
    • 556

    #2
    what do you mean clear a datacombo1? is this after you have made a selection in the datacombo1? and you want it to be blank for the next selection?

    i don't know if this is what you want but try this, it will clear the datacombo with a button.

    Code:
    Private Sub cmdClear_Click()
    DataCombo1 = ""
    End Sub
    if this is not what you want Please explain better of what your asking
    lee123

    Comment

    • Montravont
      New Member
      • Sep 2008
      • 10

      #3
      for almost all forms objects which can accept data input.. you can just use .clear so it would looks something like

      datacombo.clear


      if you want to clear the box when the form loads... just put the code in the form load portion of your program

      Comment

      • sunilkds
        New Member
        • Feb 2008
        • 16

        #4
        hello lee123,

        i am loading some data into the Datacombox.So i want delete data in the datacombobox,yo ur code

        Datacombobox="" clears only first(appearing ) value not the entire values.

        For example,
        Simple combo box has .clear() method to clear all the data at run time.

        But datacombobox doesnt......

        So how to clear Data combobox....... ...


        I want solution plz reply quickly bcz i am developing one project

        Comment

        • lee123
          Contributor
          • Feb 2007
          • 556

          #5
          hey i don't think you can, because I imagine your using an adodc or datacontrol
          right. if you are then probably you can't because your pulling information from a database like access or someother source, or maybe I'm wrong how are you getting this data your entering in.

          lee123

          Comment

          Working...