What is the wquivalent of AddItem of combo box in Win2000 Access?

M

Min

Hi, the following is working in XP Access:
cmbName.AddItem rs!Name
But in Win2000 Access, it is not working, the error message is:
"Invalid member or function".

I am just wondering, what is the equivalent of AddItem in Win2000 Access?

Thanks!
 
D

Douglas J. Steele

If the combobox is based on a query (or table), you need to add the data to
the underlying table.

If it's built up as a string (i.e.: The RowSourceType is "Value List", and
the RowSource is a bunch of text separated by semi-colons), you can simply
add the new item to the list:

Me.cboMyCombo.RowSource = Me.cboMyCombo.RowSource & ";" & strNewEntry
Me.Requery
 
P

Pieter Wijnen

you have to manipulate the rowsource property (re-build the value string) or
use a function to do this in "older" access versions

HTH

Pieter
 
Top