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

  • Thread starter Thread starter Min
  • Start date Start date
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!
 
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
 
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
 

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