Problem with .listcount

mshelley1

Carbo
Local time
Yesterday, 22:35
Joined
Feb 12, 2006
Messages
45
[RESOLVED] Problem with .listcount

When i run the following code the List62.listcount shows 1 more than the actual value. In order to get the correct value I have to modify it to List62.listcount-1; the problem with this solution is if the listcount value is 0 the listcount shows -1.

Someone please help...

If Check63.Value = True Then
List62.Visible = True
List57.Visible = False
sign.Value = "There are" & " " & List62.ListCount & " " & "Vehicles in the Impound Yard"
Else
List62.Visible = False
List57.Visible = True
sign.Value = "Notify Lien Holder List"

End If


Thank you "Oldsoftboss"

Mshelley1
 
Last edited:
Not sure if the will help or not, but from Access help:

If you set the ColumnHeads property to Yes, the row of column headings is included in the number of rows returned by the ListCount property. For combo boxes and list boxes based on a table or query, adding column headings adds an additional row. For combo boxes and list boxes based on a value list, adding column headings leaves the number of rows unchanged (the first row of values becomes the column headings).
 
[resolved]

Not sure if the will help or not, but from Access help:

If you set the ColumnHeads property to Yes, the row of column headings is included in the number of rows returned by the ListCount property. For combo boxes and list boxes based on a table or query, adding column headings adds an additional row. For combo boxes and list boxes based on a value list, adding column headings leaves the number of rows unchanged (the first row of values becomes the column headings).

Thanks "Oldsoftboss"
Mshelley1
 

Users who are viewing this thread

Back
Top Bottom