473,387 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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 32189

"crispy" <polaatx@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
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
Tim
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@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
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.public.inetserver.asp.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.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #4
Crispy,

Here is a good vbscript syntax help page.

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

Mike
"crispy" <polaatx@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
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@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
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@REMOVE THIS PART yahoo.com> wrote in message
news:n8********************************@4ax.com...
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
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") &...
19
by: GMKS | last post by:
Hello all, I have 13 check boxes on a form. I am trying to check all the check boxes to determine if they are true or false when I close the form. At present only the first IF...Then...Else...
3
by: sck10 | last post by:
Hello, I am trying to use an If Then statement inside of a repeater control. However, I am getting the following error: Expression expected. Any help would be appreciated. Thanks in...
11
by: Jason | last post by:
Hello, I would like to fill more than one lable with info in an IF then statement. I know I can do this. If radPizza.checked = true then lblsubtotal.text = FormatCurrency(mdecPizzatotal)...
3
by: Amy | last post by:
Hi, I have 6 If Then Else statements I was supposed to write. I did so but I know that they have to be wrong because they all look the same. Could someone take a look at them and point me in the...
34
by: Mike Labosh | last post by:
VS.NET 2003, ASP.NET Project with Option Strict turned ON. (yes, I know this is not the aspnet group. This is a VB syntax thing, not an ASP.NET thing) This actually compiles without the...
0
by: kamii47 | last post by:
I am creating in memory xmldocument.Previously I were validating my file against a dtd file and then by the help of GetElementByID read my needed node. i.e. XmlDocumentType doctype = null; ...
14
by: lawjake | last post by:
I am having a dispute at work over endifs, and cannot find any treatise on this. So I am hoping that I can get a lot of correspondece confirming my belief. Here it is: I believe the following:...
1
by: cryptotech2000 | last post by:
What I am looking to do is create an if then statement for a particular access query, here are the facts Tables used Mainframe Report List Fields Within the table that are used for the if...
1
by: digidave | last post by:
I am keenly aware that my coding skills are extremely noob but please indulge me a second.. Take a look at these queries.. $sql = "SELECT DISTINCT year FROM _current_floats_config WHERE active =...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.