Ho guys i got question need to ask about the if else statement:

Can i write like this

IF CUST= "A" OR CUST = "B" OR CUST = "C" THEN CUST = "A , B ,C "

Then statement i pal is if i key either A , B or C is will print out the data of A , B & C.

It is correct is write this using VB?

I'm not sure what exactly you want to do here. Do you want to call specific data and then only show that data? If that data is not available do you want to show all the data?

Please be more specific, and I'm sure we can help here.

Yes , no doubt you can do that ,

IF CUST= "A" OR CUST = "B" OR CUST = "C" THEN CUST = "A , B ,C "

It is useful when you need to check same condition or to create an advanced search !
I used this when i created an interacting program test.It started like this :

If Text1.Text = "what is your name" Or Text1.Text = "name please" Or Text1.Text = "who are you" Then
MsgBox "My name is System"
ElseIf Text1.Text = "how old are you" Or Text1.Text = "age please" Then
MsgBox "i am 10 years old !"
ElseIf Text1.Text = "please help me" Or Text1.Text = "i need help" Or Text1.Text = "look at me" Then
MsgBox "yes , tell me your problem !"
End If

I'm not sure what exactly you want to do here. Do you want to call specific data and then only show that data? If that data is not available do you want to show all the data?

Please be more specific, and I'm sure we can help here.

I obly want to call the specific data only that is A,B & C. If i input either one a ,or b it will call out thre data of all the ABC one

yes that will work the way you want.

Not that code , this one also work and this is used for more advanced search or security control.In this case the program will work only after comparing 2 conditions at the same time !

If Text1.Text = "what is your name" And Text2.Text = "name please" Then
MsgBox "My name is System"
ElseIf Text1.Text = "how old are you" And Text2.Text = "age please" Then
MsgBox "i am 10 years old !"
ElseIf Text1.Text = "please help me" And Text2.Text = "i need help" Then
MsgBox "yes , tell me your problem !"
End If

from the question. i take they want it to work if any of the conditions = a b or c. if thats the way it works then yes the first if statement will work

simple code

if a=a or b=b or c=c and d=d then f=f
'or 
if a=a or b=b or c=c and d=d then
   f=f
end if

or more

if a=a or b=b or c=c and d=d then
   f=f
else
   f=g
end if

or more

if a=a or b=b or c=c and d=d then
   f=f
elseif  c=c and d=d then
  f=h
elseif   d=d then
  f=i
else
   f=g
end if

I can't find nothing new in that code ???
I am looking for new IF statements ,

If you got rare and new ideas then
" give me that "
Else
" That code must be waste "
End if
[ hehehehehehehe ]

i donot know what u want exacly but if vb have iif maybe it work for u

a=iif(b=c,d,f)

this syntax like thsi

if b=c then
   a=d
else
  a=f
end if

maybe you wnat to some this like "case"?

select case a
   case 1
      b="a1"
   case 2
      b="a2"
   case 3
      b="a3"
   case is>3 and is<10
      b="a4-9"
   case else
      b="a>=10"
end select

Thanks for that but i never used " select case "

i need your help huhuh i need to download turbo c so that i can relate in our lesson.....help me guys i dont know to download or install turbo c:S

i need your help huhuh i need to download turbo c so that i can relate in our lesson.....help me guys i dont know to download or install turbo c

turbo C on dos?

please give me at least 10 problems with solution for a if then else statement....i will just present this to my student...just a simple one

hmmp...

please for those who have a good heart....i just dont have enough time to do all..

what does it mean?

@Katherine, the reason why you are not getting any feedback is because you have hijacked someone else's thread. Your question does not even have any reference to the original question!

Please open your OWN thread and I promise we will try and help.

@Omiridi, please do not submit any replies on hijacked threads. Rather let the member open their own post, thanks.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.