|
-
Jan 14th, 2000, 02:05 AM
#1
Thread Starter
Lively Member
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
-
Jan 14th, 2000, 02:18 AM
#2
Hyperactive Member
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.
-
Jan 14th, 2000, 02:30 AM
#3
Thread Starter
Lively Member
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
-
Jan 14th, 2000, 02:33 AM
#4
Hyperactive Member
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 :-)
-
Jan 14th, 2000, 02:58 AM
#5
Thread Starter
Lively Member
NetSurfer
It's very nice of you help me,
thanks
Roselene
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|