Code check - Null value (1 Viewer)

key

Registered User.
Local time
Today, 17:27
Joined
Jun 19, 2002
Messages
45
I've got the following code, and want to enable/disable a command button dependent on the value in the list. I don't know why, but it doesn't work (I guess it's maybe because of 'null'?)
I would appreciate your suggestions.

Key


Me!List1.Selected(0) = True
If Me!ListItemData(0) = Null Then
Me!cmdFirst.Enabled = False
Else
Me!cmdFirst.Enabled = True
End If
Me!List1.Selected(0) = False
 

NeoZakz

Registered User.
Local time
Today, 18:27
Joined
Jul 22, 2002
Messages
12
Could try this instead of the = null I had a similar problem a little while ago.

If IsNull(Me!ListItemData(0)) Then

That might work for you.
 

[nateobot]

Registered User.
Local time
Today, 17:27
Joined
Jul 15, 2002
Messages
64
What is ListItemData referred to in your code? Is that the list box?
 

key

Registered User.
Local time
Today, 17:27
Joined
Jun 19, 2002
Messages
45
NeoZakz - thanx, it works!

:)
 

Users who are viewing this thread

Top Bottom