IF else criteria in query

S

Sean G.

Hello,

I'm trying to do an if else for criteria in a query. If
the condition is met I want to grab all the data in the
query, otherwise if it isn't met I want to grab some
criterion.... I have tried it with "*", but that doesn't
seem to work, here is my iif:
IIf([forms]![frmParam_Date_ofc]![Office1] Is
Null,"*","WMS")
Any help would be very much apperciated...

-Sean
 
F

fredg

Hello,

I'm trying to do an if else for criteria in a query. If
the condition is met I want to grab all the data in the
query, otherwise if it isn't met I want to grab some
criterion.... I have tried it with "*", but that doesn't
seem to work, here is my iif:
IIf([forms]![frmParam_Date_ofc]![Office1] Is
Null,"*","WMS")
Any help would be very much apperciated...

-Sean

Like IIf(IsNull([forms]![frmParam_Date_ofc]![Office1]),"*","WMS")

The form must still be open when this query is run.
 
G

Guest

Fred,

That worked great, except if I want to do an "or" in the
else... For example:
Like IIf(IsNull([forms]![frmParam_Date_ofc]!
[Office1]),"*","WMS" or "BUF")

That doesn't work, how would I put an or into it? thank
you!
-----Original Message-----
Hello,

I'm trying to do an if else for criteria in a query. If
the condition is met I want to grab all the data in the
query, otherwise if it isn't met I want to grab some
criterion.... I have tried it with "*", but that doesn't
seem to work, here is my iif:
IIf([forms]![frmParam_Date_ofc]![Office1] Is
Null,"*","WMS")
Any help would be very much apperciated...

-Sean

Like IIf(IsNull([forms]![frmParam_Date_ofc]! [Office1]),"*","WMS")

The form must still be open when this query is run.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
D

Douglas J. Steele

Like IIf(IsNull([forms]![frmParam_Date_ofc]![Office1]),"*","WMS") OR Like
IIf(IsNull([forms]![frmParam_Date_ofc]![Office1]),"*","BUF")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Fred,

That worked great, except if I want to do an "or" in the
else... For example:
Like IIf(IsNull([forms]![frmParam_Date_ofc]!
[Office1]),"*","WMS" or "BUF")

That doesn't work, how would I put an or into it? thank
you!
-----Original Message-----
Hello,

I'm trying to do an if else for criteria in a query. If
the condition is met I want to grab all the data in the
query, otherwise if it isn't met I want to grab some
criterion.... I have tried it with "*", but that doesn't
seem to work, here is my iif:
IIf([forms]![frmParam_Date_ofc]![Office1] Is
Null,"*","WMS")
Any help would be very much apperciated...

-Sean

Like IIf(IsNull([forms]![frmParam_Date_ofc]! [Office1]),"*","WMS")

The form must still be open when this query is run.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
 
S

Sean G.

Thank you very much that worked great!
-----Original Message-----
Like IIf(IsNull([forms]![frmParam_Date_ofc]! [Office1]),"*","WMS") OR Like
IIf(IsNull([forms]![frmParam_Date_ofc]! [Office1]),"*","BUF")

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


Fred,

That worked great, except if I want to do an "or" in the
else... For example:
Like IIf(IsNull([forms]![frmParam_Date_ofc]!
[Office1]),"*","WMS" or "BUF")

That doesn't work, how would I put an or into it? thank
you!
-----Original Message-----
On Fri, 18 Jun 2004 07:25:32 -0700, Sean G. wrote:

Hello,

I'm trying to do an if else for criteria in a query. If
the condition is met I want to grab all the data in the
query, otherwise if it isn't met I want to grab some
criterion.... I have tried it with "*", but that doesn't
seem to work, here is my iif:
IIf([forms]![frmParam_Date_ofc]![Office1] Is
Null,"*","WMS")
Any help would be very much apperciated...

-Sean

Like IIf(IsNull([forms]![frmParam_Date_ofc]! [Office1]),"*","WMS")

The form must still be open when this query is run.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.


.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top