Listbox.additem error "Method Or Data Member Not Found"

  • Thread starter Thread starter Kelv
  • Start date Start date
K

Kelv

Hi, I'm using Access 2003 but managing the DB in 2000 format. I've used
several list boxes on my forms and one in particular I use the .Additem
method to create a 'Value List'. Now this piece of code works fine on my
home PC where I'm running XP Pro and Office 2k3 however when I try and run
this at work I get a "Method Or Data Member Not Found" error, and the
'.Additem' code on my listbox is highlighted.

Questions...

1. I've been reading around from my searches on Google and what I'm seeing
is that the '.Additem' method wasn't introduced until Access 2002 is this
about right?

2. If that is so is it because I've used Access 2003 to code this
particular section that I've not uncovered the problem until I've ran the DB
at work on a true Access 2000 platform? (Isn't that why 2003 offers the
ability to create DB's in earlier formats??)

3. If question 1 is correct could anyone offer an alternative for manually
populating a list box, the purpose I had intended it for was to display a
simple message such as "Record Saved".

I'll see what I can dig up on any other functionality differences in Access
so as not to get these kind of surprises again. Thanks in advance.

Kelv
 
Kelv said:
Hi, I'm using Access 2003 but managing the DB in 2000 format. I've
used several list boxes on my forms and one in particular I use the
.Additem method to create a 'Value List'. Now this piece of code
works fine on my home PC where I'm running XP Pro and Office 2k3
however when I try and run this at work I get a "Method Or Data
Member Not Found" error, and the '.Additem' code on my listbox is
highlighted.

Questions...

1. I've been reading around from my searches on Google and what I'm
seeing is that the '.Additem' method wasn't introduced until Access
2002 is this about right?
Yes.

2. If that is so is it because I've used Access 2003 to code this
particular section that I've not uncovered the problem until I've ran
the DB at work on a true Access 2000 platform? (Isn't that why 2003
offers the ability to create DB's in earlier formats??)

The file format and the feature set are two different things. Access
2000 won't even be able to read a database file in a later format. If
you use Access 2002 or 2003, but save the file in the Access 2000 file
format, then Access 2000 will be able to read the file, but any features
you may use that aren't supported by Access 2000 won't work.
3. If question 1 is correct could anyone offer an alternative for
manually populating a list box, the purpose I had intended it for was
to display a simple message such as "Record Saved".

You can simply manipulate the list box's RowSource value list directly,
by appending new, delimited, string values to it.
I'll see what I can dig up on any other functionality differences in
Access so as not to get these kind of surprises again.

Just keep an eye out for those features that were new in Access 2002 or
2003. These things are usually listed in the "What's new" topic in the
"Getting Started" section of the help file.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top