Results 1 to 5 of 5

Thread: Locking Data List object

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Itabirito,Minas Gerais, Brazil
    Posts
    79

    Post

    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

  2. #2
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    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.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Itabirito,Minas Gerais, Brazil
    Posts
    79

    Post

    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

  4. #4
    Hyperactive Member
    Join Date
    Jun 1999
    Location
    Calgary Alberta
    Posts
    359

    Post

    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 :-)

  5. #5

    Thread Starter
    Lively Member
    Join Date
    Dec 1999
    Location
    Itabirito,Minas Gerais, Brazil
    Posts
    79

    Post

    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
  •  



Click Here to Expand Forum to Full Width