Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    Apr 2003
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    AddItem method or data member not found (Access2K)

    I am trying to add a selected item from one Listbox to a second listbox (on the same form).
    When I compile I get the VB error message 'Method or data member not found' I have checked my libraries with the object browser and sure enough AddItem is not there. My references are set for DAO, Access 9, and VBA. Could you please tell me how or where I can add the AddItem and RemoveItem method to my list.
    Thank you - Lenora

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: AddItem method or data member not found (Access2K)

    You can't. AddItem and RemoveItem in Access list and comboboxes were not supported until XP. How you do it in 2000 depends on the rowsources for the respective listboxes.
    Charlotte

  3. #3
    New Lounger
    Join Date
    Apr 2003
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: AddItem method or data member not found (Access2K)

    Thank you.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: AddItem method or data member not found (Access2K)

    As Charlotte pointed out, AddItem does not exist in Access 2000.

    If the row source of the list box is a list of values, you can take this row source (it is a comma-separated string), append the new item (with a comma before it), and set the row source to the new string.

    If the row source is a table (or query), you would have to add a record to the table, using an append query, or ADO or DAO code, then requery the list box.

Posting Permissions

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