Inaccurate Combo list count

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I'm trying to get a count of items in a combo box with the following code,
but it's giving me a wrong number. The combo only shows 3 items when the
following code gives me 4.
msgbox (Me![cboSerialNumber].ListCount)

What's wrong with the above code? Currently using MsAccess 2000. Any help is
greatly appreciated.
 
Hi Samantha

If you have column headings turned on in your combo or list box, then the
headings are counted as one of the list rows, so ListCount (and also
ListIndex) will be one greater than you expect it to be.
 

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