M maw230 somewhat competent Local time Today, 16:33 Joined Dec 9, 2009 Messages 520 Mar 31, 2010 #1 I want my IIF statement to not show a record if it is False. IIF(([value1])<>([value2]), ([value1]), *do not return record*) can't seem to find what i should use there.
I want my IIF statement to not show a record if it is False. IIF(([value1])<>([value2]), ([value1]), *do not return record*) can't seem to find what i should use there.
FoFa Registered User. Local time Today, 16:33 Joined Jan 29, 2003 Messages 3,653 Mar 31, 2010 #2 It needs to be in your criteria. need more information to assist further.
SOS Registered Lunatic Local time Today, 14:33 Joined Aug 27, 2008 Messages 3,512 Mar 31, 2010 #3 How about: IIF([value1]<>[value2], [value1], "") EDIT: And you don't need all of those parentheses...
How about: IIF([value1]<>[value2], [value1], "") EDIT: And you don't need all of those parentheses...
M maw230 somewhat competent Local time Today, 16:33 Joined Dec 9, 2009 Messages 520 Mar 31, 2010 #4 SOS, won't that just leave the field blank? I want it to not show the entire record. here is the actual code that i have in the 'Field' portion of design view: Code: Price: IIf(([JDNETP]<>0.59*[JDLIST]),[JDNETP],Null) I tried Null but it just leaves the field blank while still returning the record.
SOS, won't that just leave the field blank? I want it to not show the entire record. here is the actual code that i have in the 'Field' portion of design view: Code: Price: IIf(([JDNETP]<>0.59*[JDLIST]),[JDNETP],Null) I tried Null but it just leaves the field blank while still returning the record.
FoFa Registered User. Local time Today, 16:33 Joined Jan 29, 2003 Messages 3,653 Mar 31, 2010 #5 To NOT return a record, it needs to be in your Criteria, not at a field level. WHERE ([JDNETP]<>0.59*[JDLIST]) as an example
To NOT return a record, it needs to be in your Criteria, not at a field level. WHERE ([JDNETP]<>0.59*[JDLIST]) as an example
SOS Registered Lunatic Local time Today, 14:33 Joined Aug 27, 2008 Messages 3,512 Mar 31, 2010 #6 If you don't want it to show the entire record then you just need to put this in the criteria of value1 (no IIF needed): <>[Value2]
If you don't want it to show the entire record then you just need to put this in the criteria of value1 (no IIF needed): <>[Value2]
M maw230 somewhat competent Local time Today, 16:33 Joined Dec 9, 2009 Messages 520 Mar 31, 2010 #7 i tried that but i was unable to use the sums and group by's, because blah blah is "not part of an aggregate function." i need to use the sum function in that query.
i tried that but i was unable to use the sums and group by's, because blah blah is "not part of an aggregate function." i need to use the sum function in that query.
SOS Registered Lunatic Local time Today, 14:33 Joined Aug 27, 2008 Messages 3,512 Mar 31, 2010 #8 No, you can select your field again at the end of your grid and change the GROUP BY to WHERE and then use that in the criteria.
No, you can select your field again at the end of your grid and change the GROUP BY to WHERE and then use that in the criteria.
M maw230 somewhat competent Local time Today, 16:33 Joined Dec 9, 2009 Messages 520 Mar 31, 2010 #9 i see what you're saying. looks to be working fine. thanks a lot everyone