473,573 Members | 2,686 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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
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@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.
(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@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") & "<br>" RS.MOVENEXT WEND
19
8206
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 works and then Exits the Sub. Example:
3
19787
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 advance,
11
1524
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) end if
3
3927
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 right direction about what I am not doing correctly? 1.. Write an If Then Else statement that displays the string "Pontiac" in the CarMakeLabel...
34
3008
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 "Then" keyword. What gives?!? If Not Page.IsPostBack End If
0
2613
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; doctype = statementsDocument.CreateDocumentType("queries", null,statementsPath +"\\Validation.dtd", null); statementsDocument.AppendChild(doctype); ...
14
4183
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)If a language has an "endif", then every "if" statement requires an endif, and (2) every "endif" goes with the last "if". For example,
1
1714
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 then statement GENERATIONS FREQUENCY EXTENDED
1
1975
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 = 'yes' ORDER BY year DESC LIMIT 2, 1"; $result = mysql_query($sql); while($fetched = mysql_fetch_array($result)) { $ceiling = $fetched; }...
0
7746
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7668
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8179
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6358
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5556
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5258
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3701
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
2167
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1269
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.