G
Guest
I have listox1 and listbox2. What I want to do is when I click on listbox1
and some records will display in listbox2 but when there are no records
displayed in listbox2, i want to disable button1 and button2.
The code looks like this:
Private sub Listbox1_Click()
If Me.listbox2 = "" Then
Me.button1 = False
Me.button2.Enabled = False
Else
Me.button1.Enabled = True
Me.button2.Enabled = True
End If
However, it doesn't seem to work. Any ideas if i'm doing it correctly? Thanks.
ck
and some records will display in listbox2 but when there are no records
displayed in listbox2, i want to disable button1 and button2.
The code looks like this:
Private sub Listbox1_Click()
If Me.listbox2 = "" Then
Me.button1 = False
Me.button2.Enabled = False
Else
Me.button1.Enabled = True
Me.button2.Enabled = True
End If
However, it doesn't seem to work. Any ideas if i'm doing it correctly? Thanks.
ck