From: Eva on
Hi
I have a number of things I need to test in the query. I need to use IIF
statement with AND (for example in Excel you can do it),.
Example
I need this
IIf (and(cat="HS",cat2="JTK",cat3="NT"),"1","2")
how to do it in access?

--

Greatly appreciated

Eva
From: XPS350 on
On 7 apr, 21:09, Eva <E...(a)discussions.microsoft.com> wrote:
> Hi
> I have a number of things I need to test in the query. I need to use IIF
> statement with AND (for example in Excel you can do it),.
> Example
> I need this
> IIf (and(cat="HS",cat2="JTK",cat3="NT"),"1","2")
> how to do it in access?
>
> --
>
> Greatly appreciated
>
> Eva


IIf (cat="HS" and cat2="JTK" and cat3="NT","1","2")

Groeten,

Peter
http://access.xps350.com
From: KARL DEWEY on
Try this --
IIf (cat="HS" or cat2="JTK" or cat3="NT","1","2")

--
Build a little, test a little.


"Eva" wrote:

> Hi
> I have a number of things I need to test in the query. I need to use IIF
> statement with AND (for example in Excel you can do it),.
> Example
> I need this
> IIf (and(cat="HS",cat2="JTK",cat3="NT"),"1","2")
> how to do it in access?
>
> --
>
> Greatly appreciated
>
> Eva
From: Eva on
Hi
I used finaly or, but your post helped me to think it over. Thank you!
--


Greatly appreciated

Eva


"XPS350" wrote:

> On 7 apr, 21:09, Eva <E...(a)discussions.microsoft.com> wrote:
> > Hi
> > I have a number of things I need to test in the query. I need to use IIF
> > statement with AND (for example in Excel you can do it),.
> > Example
> > I need this
> > IIf (and(cat="HS",cat2="JTK",cat3="NT"),"1","2")
> > how to do it in access?
> >
> > --
> >
> > Greatly appreciated
> >
> > Eva
>
>
> IIf (cat="HS" and cat2="JTK" and cat3="NT","1","2")
>
> Groeten,
>
> Peter
> http://access.xps350.com
> .
>