473,573 Members | 2,686 Online

# Can i say OR in an if/then statement

I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy
Jul 19 '05 #1
6 32235

"crispy" <polaatx@REMO VE THIS PART yahoo.com> wrote in message
news:n8******** *************** *********@4ax.c om...
I am trying to say

if (condition) is true OR (condition) is true THEN

if (condition) OR (condition) THEN

or

if (condition) = true OR (condition) = true THEN

but remeber that is a boolean value true or false, it is not the same a
string value "true"

in that case

use
if (condition) = 'true' OR (condition) = 'true' THEN

you may even want to use lcase(condition ) = 'true'

lcase(value) chanes it to lower case

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #2
I can only guess that you tried

if x=5 or 10 then

which is incorrect and should be

if x=5 or x=10 then
Tim

"crispy" <polaatx@REMO VE THIS PART yahoo.com> wrote in message
news:n8******** *************** *********@4ax.c om...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #3
Tim wrote on 09 jul 2003 in microsoft.publi c.inetserver.as p.general:
I can only guess that you tried

if x=5 or 10 then

which is incorrect and should be

if x=5 or x=10 then

And:

if x=5 or not x>3 then

is legal.

--
Evertjan.
The Netherlands.
Jul 19 '05 #4
Crispy,

Here is a good vbscript syntax help page.

http://www.devguru.com/Technologies/...ipt_intro.html

Mike
"crispy" <polaatx@REMO VE THIS PART yahoo.com> wrote in message
news:n8******** *************** *********@4ax.c om...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #5
I strongly recommend you use brackets to keep track of things.

if (x=1) or (x=2) then
'x is either 1 or 2
end if
You'll end up going insane trying to solve order of operation bugs if you
don't.
"crispy" <polaatx@REMO VE THIS PART yahoo.com> wrote in message
news:n8******** *************** *********@4ax.c om...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #6
Thank you all for your help.

crispy

"crispy" <polaatx@REMO VE THIS PART yahoo.com> wrote in message
news:n8******** *************** *********@4ax.c om...
I am trying to say

if (condition) is true OR (condition) is true THEN

Can I use OR or do ihave to break it down into an elseif statement?

I tried OR but it does not seem to work.

thanks. crispy

Jul 19 '05 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

### Similar topics

 7 2518 by: Gert Albertse | last post by: I retrieve the recordset RS("SelectedMultiDisabilityEvent") form a table. The data type is text. When I run the next code: WHILE NOT RS.EOF Response.Write RS("SelectedMultiDisabilityEvent") & "