473,396 Members | 1,764 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,396 software developers and data experts.

Conditional expressions

HELP,

Could anyone help me with this one.

I am building query that includes postall addresses, I would like to be able
to include calculated control "REGION" which would disply either "CITY" or
"COUNTRY" depending in what range the Postcode is located.

The problem is that there are multiple ranges for "CITY" as well as for
"COUNTRY".

The postcodes are in the range of 0200 and 3000, for example Postcode range:

Between 2000 and 2200 - City
Between 2550 and 2700 - City
Between 2800 and 2850 - City

other should be labelled as "COUNTRY".

I have tried to use the following conditional expression in the query, but I
don't know how to include more than one range.

Region: IIf([Postcode] Between '2000' And '2200',"City","Country")

Can anyone help me with this problem, please!!!!
Nov 13 '05 #1
2 3078
Region: IIf(([Postcode] Between '2000' And '2200')
Or ([Postcode] Between '2550' And '2700')
Or ([Postcode] Between '2800' And '2850'),
"City", "Country")

I'm sure the Melbourne people will love that! :-)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wesley" <we****@nospam.net.au> wrote in message
news:cm***********@otis.netspace.net.au...
HELP,

Could anyone help me with this one.

I am building query that includes postall addresses, I would like to be
able to include calculated control "REGION" which would disply either
"CITY" or "COUNTRY" depending in what range the Postcode is located.

The problem is that there are multiple ranges for "CITY" as well as for
"COUNTRY".

The postcodes are in the range of 0200 and 3000, for example Postcode
range:

Between 2000 and 2200 - City
Between 2550 and 2700 - City
Between 2800 and 2850 - City

other should be labelled as "COUNTRY".

I have tried to use the following conditional expression in the query, but
I don't know how to include more than one range.

Region: IIf([Postcode] Between '2000' And '2200',"City","Country")

Can anyone help me with this problem, please!!!!

Nov 13 '05 #2
Thanks Allen,

A word of explanation, the distribution database is for NSW only.

Didn't mean to offend anyone! :-)

Cheers

Wesley

"Allen Browne" <Al*********@SeeSig.Invalid> wrote in message
news:41**********************@per-qv1-newsreader-01.iinet.net.au...
Region: IIf(([Postcode] Between '2000' And '2200')
Or ([Postcode] Between '2550' And '2700')
Or ([Postcode] Between '2800' And '2850'),
"City", "Country")

I'm sure the Melbourne people will love that! :-)

--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Wesley" <we****@nospam.net.au> wrote in message
news:cm***********@otis.netspace.net.au...
HELP,

Could anyone help me with this one.

I am building query that includes postall addresses, I would like to be
able to include calculated control "REGION" which would disply either
"CITY" or "COUNTRY" depending in what range the Postcode is located.

The problem is that there are multiple ranges for "CITY" as well as for
"COUNTRY".

The postcodes are in the range of 0200 and 3000, for example Postcode
range:

Between 2000 and 2200 - City
Between 2550 and 2700 - City
Between 2800 and 2850 - City

other should be labelled as "COUNTRY".

I have tried to use the following conditional expression in the query,
but I don't know how to include more than one range.

Region: IIf([Postcode] Between '2000' And '2200',"City","Country")

Can anyone help me with this problem, please!!!!


Nov 13 '05 #3

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

Similar topics

8
by: neblackcat | last post by:
Would anyone like to comment on the following idea? I was just going to offer it as a new PEP until it was suggested that I post it here for comment & consideration against PEP 308. I'm far...
26
by: Ney André de Mello Zunino | last post by:
Hello. I have noticed, in a lot of C and C++ code, that many programmers seem to prefer putting the test values first in conditional expressions. I.e., they would rather write this: if (-1 ==...
62
by: Reinhold Birkenfeld | last post by:
Hi, after Guido's pronouncement yesterday, in one of the next versions of Python there will be a conditional expression with the following syntax: X if C else Y which is the same as today's...
92
by: Raghavendra R A V, CSS India | last post by:
hie.. Do any one knows how to write a C program without using the conditional statements if, for, while, do, switch, goto and even condotional statements ? It would be a great help for me if...
6
by: Chris Dunaway | last post by:
Consider this code (.Net 2.0) which uses a nullable type: private void button1_Click(object sender, System.EventArgs e) { DateTime? nullableDate; nullableDate = (condition) ? null :...
8
by: Olov Johansson | last post by:
I just found out that JavaScript 1.5 (I tested this with Firefox 1.0.7 and Konqueror 3.5) has support not only for standard function definitions, function expressions (lambdas) and Function...
11
by: volcs0 | last post by:
I've done this in Scheme, but I'm not sure I can in Python. I want the equivalent of this: if a == "yes": answer = "go ahead" else: answer = "stop" in this more compact form:
5
by: A.M | last post by:
Hi, I am using Python 2.4. I read the PEP 308 at: http://www.python.org/dev/peps/pep-0308/
5
by: paulo | last post by:
Can anyone please tell me how the C language interprets the following code: #include <stdio.h> int main(void) { int a = 1; int b = 10; int x = 3;
15
by: Nicholas M. Makin | last post by:
I was just thinking that I understood the conditional operator when I coded the following expecting it to fail: int a= 10, b= 20, c= 0; ((a < b) ? a : b) = c; // a=0 a=20; b= 10; ((a < b) ? a...
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: 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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...

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.