Code check - Null value

key

Registered User.
Local time
Today, 17:05
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
 
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.
 
What is ListItemData referred to in your code? Is that the list box?
 

Users who are viewing this thread

Back
Top Bottom