I am trying to write an expression and having trouble. I get the first part of my arguments correct but when I try to add the third I run into trouble. Here is the first part of the expression: - =IIf([completedate]>"",
-
"Complete",
-
IIf(
-
IsNull([CompleteDate]) And ([DueDate]<Date()),
-
"Overdue",
-
""
-
)
-
)
This works correctly. When I try and add the last bit it does not work. Here is what I am trying to add IIf([ReviewDate]<= Date(),"In Process","")
Can anyone help me.
Try with: - =IIf(Not [CompleteDate] Is Null,
-
"Complete",
-
IIf([ReviewDate] <= Date(),
-
"In Process",
-
IIf([DueDate] < Date()
-
"Overdue",
-
Null)))
2 16878
Try with: - =IIf(Not [CompleteDate] Is Null,
-
"Complete",
-
IIf([ReviewDate] <= Date(),
-
"In Process",
-
IIf([DueDate] < Date()
-
"Overdue",
-
Null)))
zmbd 5,501
Expert Mod 4TB
@Teri B
When writing nested IIF() functions I usually start out by creating the skeleton code
(would you post back which database you're using) Start with the outer IIF - notice the stepping of the code -
stepping your code will help keep things straight in you mind -
IIF(condition,
-
true,
-
false
-
)
-
Now add the inner IIF(); in this example an on false -
IIF(condition,
-
true,
-
IIF(condition2
-
true,
-
false
-
)
-
)
-
at this point keep adding and stepping -
- say I want a on true for the 3rd -
IIF(condition,
-
true,
-
IIF(condition2
-
IFF(condition3,
-
true,
-
false
-
),
-
false
-
)
-
)
-
-
quite often in VBA I'll comment the code as I go; unfortunately, -
most SQL will not let you add comments -
IIF(condition1,
-
'on true event condition1
-
true,
-
'on false event condition1
-
IIF(condition2
-
'on true event condition2
-
IFF(condition3,
-
'on true event condition3
-
true,
-
'on false event condition3
-
false
-
),
-
'on false event condition2
-
false
-
)
-
)
-
From this point, now that the skeleton is laid out, -
insert your true and false actions at each branch -
within the nested functions -
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Paul Rubin |
last post by:
OK, I want to scan a file for lines matching a certain regexp. I'd
like to use an assignment expression, like
for line in file:
if (g := re.match(pat, line)):
croggle(g.group(1))
Since...
|
by: Roy Yao |
last post by:
Does it mean "(sizeof(int))* (p)" or "sizeof( (int)(*p) )" ?
According to my analysis, operator sizeof, (type) and * have the same
precedence, and they combine from right to left. Then this...
|
by: Tony Johansson |
last post by:
Hello Experts!
I'm reading i a book about C++ and they mention infix with telling what it
is.
I hope you out there can do so.
Many thanks!
//Tony
|
by: Mike Turco |
last post by:
I like using the expression builder for a lot of different things but it
isn't always available when I want to use it, for example in the code
window, or in all of the control properties. I am...
|
by: John Temples |
last post by:
Given this code:
extern volatile unsigned char v;
int main(void)
{
v;
return 0;
}
|
by: Billa |
last post by:
Hi,
I am replaceing a big string using different regular expressions (see
some example at the end of the message). The problem is whenever I
apply a "replace" it makes a new copy of string and I...
|
by: lovecreatesbea... |
last post by:
---quoting---
Annex C (informative) Sequence points
1 The following are the sequence points described in 5.1.2.3:
- The end of a full expression: an initializer (6.7.8); the
expression in an...
|
by: Marc Gravell |
last post by:
In Linq, you can apparently get a meaningful body from and
expression's .ToString(); random question - does anybody know if linq
also includes a parser? It just seemed it might be a handy way to...
|
by: dspfun |
last post by:
Hi!
The words "expression" and "statement" are often used in C99 and C-
textbooks, however, I am not sure of the clear defintion of these
words with respect to C.
Can somebody provide a sharp...
|
by: madankarmukta |
last post by:
Here is the Code Sample for converting the Given LINQ Expression to currosponding Expression Tree.
//using LINQAlias = System.Linq.Expressions;
List<Host> dinnerList = new List<Host>()
...
|
by: CloudSolutions |
last post by:
Introduction:
For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: ryjfgjl |
last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
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
| |