nested IIF query problem

  • Thread starter Thread starter shanej
  • Start date Start date
S

shanej

the following query is supposed to give me all non-null if "Published",
or all null if "Unpublished, or both if anything else. It only works
for Published. I tried each of the pieces seperalty and they work fine,
but not together in nested IIFs. Here is the query broken down for ease
or reading:

Like (IIf([forms].[F_Opinion_View].[OPpub]="Published",
"*/*/*",
(IIf([forms].[F_Opinion_View].[OPpub]="Unpublished",
([our_opinions].[OP_published]) Is Null,
(([our_opinions].[OP_published]) Like "*/*/*" Or
([our_opinions].[OP_published]) Is Null)))))


FYI: the field is a date field.

any ideas?
 
hi,

try this:

FACTOR:
IIf([forms].[F_Opinion_View].[OPpub]="Published","*/*/*",IIf([forms].[F_Opinion_View].[OPpub]="Unpublished",Null,"BOTH"))

Hope this works. Let me know!

geebee
 
no...it seems that it is just too complex. i'm now trying to use the
form to send the proper expression. see my new post.
geebee said:
hi,

try this:

FACTOR:
IIf([forms].[F_Opinion_View].[OPpub]="Published","*/*/*",IIf([forms].[F_Opinion_View].[OPpub]="Unpublished",Null,"BOTH"))

Hope this works. Let me know!

geebee


shanej said:
the following query is supposed to give me all non-null if "Published",
or all null if "Unpublished, or both if anything else. It only works
for Published. I tried each of the pieces seperalty and they work fine,
but not together in nested IIFs. Here is the query broken down for ease
or reading:

Like (IIf([forms].[F_Opinion_View].[OPpub]="Published",
"*/*/*",
(IIf([forms].[F_Opinion_View].[OPpub]="Unpublished",
([our_opinions].[OP_published]) Is Null,
(([our_opinions].[OP_published]) Like "*/*/*" Or
([our_opinions].[OP_published]) Is Null)))))


FYI: the field is a date field.

any ideas?
 

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

Similar Threads


Back
Top