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.
 
Back
Top