-
Hi, everybody!
I have a form with several objects. I’d like to be sure that the 1rst. Object has a value before allowing the user to click on other objects. So, I locked all the objects, (except the 1rst. one) on the form load event and put the following module on the click property of my Data List objects:
If isnull(MyDataList) = false then
[MyNextDataList].locked = false
[MyNextDataList].setFocus
End if
But, when I click on a Data List, even tough it’s locked and empty, the next list box becomes unlocked and receives the focus.
What I am doing wrong?
Thanks in advance,
Roselene
-
it's probably not null, may be -1 or 0 or something. try putting a stop right befor the if isnull statement and check what MyDataList's value is. Or
msgbox "This is the value:" & MyDataList, vbokonly, "Test"
then it will tell you. The msg box may fail though I don't know.
-
NetSurfer,
The Text box works, but nothing appears, like this:
This is the value:
So I've tried:
If MyDataList = "" and it works!
Brazilian thanks,
Roselene
-
That's because the value of the MyDataList isn't null but -1 or similar. It would show up as blank but not null. Thus the if isnull is always false but the if "" would be true. Gad to help :-)
-
NetSurfer
It's very nice of you help me,
thanks
Roselene