comboboxes

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lee123
    Contributor
    • Feb 2007
    • 556

    comboboxes

    ok here is the Question: is there a way to add items to a combo box from a table made from the (visual data manager) using Access or do you have to use an ADODC control with this, or is there another way to do this. because if i have customers i want to add i would like to add them or delete them from the combo box with a button

    lee123
  • vdraceil
    New Member
    • Jul 2007
    • 236

    #2
    Even if you create a database using Visual Data Manager,it behaves as an ordinary .mdb file.
    You cannot directly link your controls without an intermediate ADODC/DAO.
    Ordinary Data Control/DAO would do..
    when giving add/remove command,add/remove the item from both the combo box and database table via DAO.

    Comment

    • lee123
      Contributor
      • Feb 2007
      • 556

      #3
      So what your saying if i use the ado control on the form will this save the information in the ComboBox and in the code do this:

      Code:
      adodc1.recordset.addnew
      combo1.additem(adodc1.recordset)
      how would i specifiy the field like Customers Name?

      lee123

      Comment

      • debasisdas
        Recognized Expert Expert
        • Dec 2006
        • 8119

        #4
        a simple loop through the recordset would do the trick for you. to delete simply follw the nornal delete process as you do with recordset and refresh the recordset to relect the same in your combo box.

        Comment

        Working...