Question If statement with List Box.

DanJames

Registered User.
Local time
Today, 05:53
Joined
Sep 3, 2009
Messages
78
I want to know how to write: If a list box on form "PaymentsDue" has more than 1 piece of data in it then make label1 on form "info" Visible = True. I know how to do the visible bit but not the on the other form bit. Can anyone help ?
 
Dan,

Code:
If Forms!PaymentsDue!YourListBox.ListCount > 1 Then
   Forms!info!Label1.Visible = True
Else
   Forms!info!Label1.Visible = True
End If

Obviously BOTH forms must be open.

hth,
Wayne
 
I'd now like it to say Something like:
Code:
If Forms!PaymentsDue!YourListBox.ListCount > 1 Then
   Forms!info!Label1.Value = "There are ""There are " & Forms!PaymentsDue!List14.ListCount & " clients with payments Due including" & 'by here the names of a few in the list box.
Else
   Forms!info!Label1.Visible = False
End If

So really I need to know how to say a value in the column "Name" of the listbox aswell. Thanks alot, Dan
 

Users who are viewing this thread

Back
Top Bottom