473,406 Members | 2,549 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,406 software developers and data experts.

Nesting Help

Why wouldn’t this work?

I am trying to have access return a specific result based on whether a field has one of two conditions being met (13 or 66) in a single field,

This returns the correct Hospital code, but it includes those that are not equal to 13 or 66 in [INS_CAT]

MRH2: IIf([INS_CAT]="66" Or "13",IIf([SD99000 Price File.Hospital]=40,"0",IIf([SD99000 Price File.Hospital]=41,"1",IIf([SD99000 Price File.Hospital]=43,"3",IIf([SD99000 Price File.Hospital]=44,"4",IIf([SD99000 Price File.Hospital]=45,"5"," "))))))

This Returns only results for [INS_CAT]=66 but not 13

MRH: IIf([INS_CAT]=66,IIf([SD99000 Price File.Hospital]=40,"0",IIf([SD99000 Price File.Hospital]=41,"1",IIf([SD99000 Price File.Hospital]=43,"3",IIf([SD99000 Price File.Hospital]=44,"4",IIf([SD99000 Price File.Hospital]=45,"5",IIf([INS_CAT]=13,IIf([SD99000 Price File.Hospital]=40,"0",IIf([SD99000 Price File.Hospital]=41,"1",IIf([SD99000 Price File.Hospital]=43,"3",IIf([SD99000 Price File.Hospital]=44,"4",IIf([SD99000 Price File.Hospital]=45,"5"," "))))))))))))

Any thought’s on a better way to write this?
Nov 16 '07 #1
1 1166
Rabbit
12,516 Expert Mod 8TB
You can't do:
Expand|Select|Wrap|Line Numbers
  1. SomeField = "Value1" Or "Value2"
  2.  
You can do:
Expand|Select|Wrap|Line Numbers
  1. SomeField = "Value1" Or SomeField = "Value2"
  2.  
  3. OR
  4.  
  5. SomeField In ("Value1", "Value2")
  6.  
Nov 16 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Piet | last post by:
Hi, I am trying to generate an "hierarchical" layout based on wx.NoteBooks. That means, every page of a Notebook should be a NoteBookon its own. Here is a (short but complicated) piece of code...
3
by: Michael Hertz | last post by:
I have hundreds of samples of XML documents on my harddisc. But all of them lack the one or another feature of XML. Some XML documents have no attributes some others are rather flat (nesting...
0
by: Wolfgang Schwanke | last post by:
Dear usenet, I'm having the following small problem. I've been ask to add some Quicktime panoramas to a website. The author of the panoramas has made two versions of each: One in MOV format,...
8
by: CoolPint | last post by:
I read in books that nested class cannot access private members of nesting class and vice versa unless they are made friends. Somehow, my compiler is letting my nested class member functions access...
8
by: Hardrock | last post by:
I encountered some difficulty in implementing dynamic loop nesting. I.e. the number of nesting in a for(...) loop is determined at run time. For example void f(int n) { For(i=0; i<=K; i++)...
6
by: Neal | last post by:
Hi All, I used an article on XSLT and XML and creating a TOC written on the MSDN CodeCorner. ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/dncodecorn/html/corner042699.htm However, it did'nt...
4
by: kl.vanw | last post by:
I would like to count the nesting level in template classes. How can I make the following work? #include <assert.h> template <class T> class A { public: A() { // what goes here?
12
by: TristaSD | last post by:
Hi, Here's a nice footer I get inside every php page I write in wwwroot on my server. The code gets parsed just fine. I installed php5.2-win32 under W2K Server, IIS 5.0. I've installed php on...
6
by: stephen.cunliffe | last post by:
Hi, I'm looking for opinion/facts/arguments on the correct nesting of UL, OL, & LI elements. For example, this is what I want (unordered list): * Item 1 * Item 2 * Item 3
17
by: henry | last post by:
Folks Here's a skeleton, generic HTML page, call it "index.php". You'll see a bit of php code in the middle: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"...
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
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:
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
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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...

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.