Results 1 to 12 of 12
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Question Unanswered: combo2.addItem... not working

    I have a loop that adds items to a combobox
    me.combo2.addItem (rs!Measure)

    It used to work. but now it doesn't want to anymore.
    I get an error: method or data member not found!

    thanks in advance
    ActionAnt

  2. #2
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346

    Re: combo2.addItem... not working

    Try removing the parantheses

    me.combo2.addItem rs!Measure

    or if you want the parantheses use the call method

    call me.combo2.additem(rs!Measure)
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  3. #3
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: combo2.addItem... not working

    Originally posted by SCIROCCO
    Try removing the parantheses

    me.combo2.addItem rs!Measure

    or if you want the parantheses use the call method

    call me.combo2.additem(rs!Measure)
    no change

  4. #4
    Join Date
    Mar 2004
    Location
    www.scirocco.ca
    Posts
    346

    Re: combo2.addItem... not working

    Are you sure your combo box is named combo2? (sometimes when we add combo boxes to a form we forget to rename the objects)
    http://www.scirocco.ca/images/banner...occobanner.gif

    Download for FREE the ADO/DAO Data Controls that makes life EASIER developing database applications in: VB, FoxPro, Access, VC++, .NET etc... Navigate, Add New, Delete, Update, Search, Undo and Save your changes. Supports Disconnected Recordsets and Transactions!

    Or try our Ask An Expert service to answer any of your questions!

  5. #5
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: combo2.addItem... not working

    Originally posted by SCIROCCO
    Are you sure your combo box is named combo2? (sometimes when we add combo boxes to a form we forget to rename the objects)
    yes
    checked that

  6. #6
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: combo2.addItem... not working

    Originally posted by actionant
    I have a loop that adds items to a combobox
    me.combo2.addItem (rs!Measure)

    It used to work. but now it doesn't want to anymore.
    I get an error: method or data member not found!

    thanks in advance
    ActionAnt
    Access version?

  7. #7
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: combo2.addItem... not working

    Originally posted by M Owen
    Access version?
    2000

  8. #8
    Join Date
    Oct 2003
    Location
    Roanoke, Va
    Posts
    445

    Re: combo2.addItem... not working

    Originally posted by actionant
    yes
    checked that
    ... And when you hit the dot next to combo2, the autolist shows the additem method available?
    Gregg


    DAO, ADO, SQL, Automation and anything else I can pick up.

  9. #9
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: combo2.addItem... not working

    Originally posted by basicmek
    ... And when you hit the dot next to combo2, the autolist shows the additem method available?
    no it isn't there.
    but then I'm not sure its ever been there?

  10. #10
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Re: combo2.addItem... not working

    Originally posted by basicmek
    ... And when you hit the dot next to combo2, the autolist shows the additem method available?
    how do I get it to work if I can't use the AdItem function? or
    how do I get the AddItem funtion to work?

  11. #11
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    2000 does not support the AddItem method. You have to use either the Value List or bind to a table/query ...

  12. #12
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178
    Originally posted by M Owen
    2000 does not support the AddItem method. You have to use either the Value List or bind to a table/query ...
    thanks I'll do that.
    I wonder why it was working previously though?

    ActionAnt

Posting Permissions

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