Results 1 to 5 of 5

Thread: simple ?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    28

    Wink

    Here's my problem, I got to list boxes A.value and C.value

    If a.value & C.value="stay" then
    b.value="somthing"


    my problem is that I get an error message were the & symbol is. However when I go to write out AND in the code it still doesn't pick it up...Y? :-)

  2. #2
    Guest

    comparing values

    Try comparing both values explicitly:

    if A.value="Stay" and C.value = "Stay" then .....


    I believe A.value AND C.value will give you a BOOLEAN word level comparision. Alternatively, A.value & C.value will give you a boolean bitwise comparision.

    Good Luck
    DerFarm

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jul 2000
    Posts
    28

    Lightbulb

    still not working...

  4. #4
    Junior Member
    Join Date
    Sep 2000
    Posts
    20
    raven

    If you have two list boxes then try
    if a.list(a.listindex)=c.list(c.listindex) then
    ....
    end if

    listboxes do not have a value method/property

    remember a.list(a.listindex) will only work if something is selected in a's listbox if not u will probibly get an error
    in your load form function say a.listindex=0 to select the first value etc.

    jfg

  5. #5
    Guest
    Listboxes don't have a value property. It'd be something like this:

    Code:
    Private Sub Command1_Click()
    If List1.Text = "stay" And List2.Text = "stay" Then
    List3.AddItem "something"
    End If
    End Sub

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