Hi to all and thanks for the support,
I have a list box with family names. When the user clicks
on a name another form opens, FamilyMembers, showing all
the family members. This works fine.
Now I would like to add a button next to the list box with
the following behaviour: If there is even one record in
the list box the button will be inactive. If there are no
records in the list box the button becomes active and
opens the FamilyMembers form to a new record. How can I
count the records in the listbox?
Any help will be greatly appreciated
.
Marshall Barton - 18 Jan 2005 17:41 GMT
>I have a list box with family names. When the user clicks
>on a name another form opens, FamilyMembers, showing all
[quoted text clipped - 6 lines]
>opens the FamilyMembers form to a new record. How can I
>count the records in the listbox?
Use the ListCount property.

Signature
Marsh
MVP [MS Access]
george - 18 Jan 2005 19:36 GMT
Marsh
thanks for your reply, can you please give me a simple
example of this property? My list box is on a tab page
thanks george
>-----Original Message-----
>>I have a list box with family names. When the user clicks
[quoted text clipped - 9 lines]
>
>Use the ListCount property.
Marshall Barton - 19 Jan 2005 00:17 GMT
It may depends on the context of what/where you're trying to
do. The general idea is:
If Me.thelistbox.ListCount > 0 Then
'there's something in the list
Else
'the list is empty
End If

Signature
Marsh
MVP [MS Access]
>thanks for your reply, can you please give me a simple
>example of this property? My list box is on a tab page
[quoted text clipped - 16 lines]
>>
>>Use the ListCount property.