|
-
Sep 22nd, 2000, 01:34 PM
#1
Thread Starter
Junior Member
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? :-)
-
Sep 22nd, 2000, 01:40 PM
#2
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
-
Sep 22nd, 2000, 01:53 PM
#3
Thread Starter
Junior Member
-
Sep 22nd, 2000, 02:01 PM
#4
Junior Member
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
-
Sep 22nd, 2000, 05:44 PM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|