add items to a combo box with code

L

L Melville

Hi,

I am having problems adding items to a combo box, I am using access 2000 and
it does not recognise the ;-

..additem

method, anyone have any ideas what could be wrong?


thanks
 
M

Michel Walsh

Hi,


With Access 2000, and previous version, you add "the info" in a table,
so it "persist" in that table (you do not have to repeat the operation each
time you start the application). VB6 not having necessary a database behind
it uses AddItem to fill the list, each time you start the application, but
Access, having tables at its disposal, will use a table/query to pump the
list, instead, and at the price of not even a single line of code. If you do
not want to use a table (say, the list is Red, Yellow, Green) you can use
the value list, rather than the table/query for the RowSourceType property,
and specify "Red,Yellow,Green" for the RowSource.


Hoping it may help,
Vanderghast, Access MVP
 

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

Top