Hi All,
I'm trying to produce 3 outcomes in one field using the DateAdd function but I can't get it to work.
This is what I want to happen :
If Field A = "Medical", DateAdd('yyyy',1,(DateAdd('m',3,[Field B] (I CAN GET THIS PART TO WORK FINE)
If Field A = "Yes", DateAdd('yyyy',1,[Field B] (I CAN GET THIS TO WORK FINE BUT NOT WHEN I NEST IT WITH THE ABOVE!)
Third scenario is ELSE "N/A"
This is what I thought would work :
Next Review Date : IIf([Field A] = "Medical",(DateAdd('yyyy',1,(DateAdd('m',3,[Field B],IIf([Field A] = "Yes", (DateAdd('yyyy',1,[Field B],"N/A")))))
Regards
Darren
1 1157
Try this: - IIf([Field A] = "Medical", _
-
(DateAdd("yyyy", 1, (DateAdd("m", 3, [Field B])), _
-
IIf([Field A] = "Yes", _
-
DateAdd("yyyy", 1, [Field B]), _
-
"N/A"))))
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Abdul N K |
last post by:
I need help in T-SQL.
I am using DATEADD function and I want to add 6 months to a date. But
it does not return me the rusults, which I want
e.g. SELECT DATEADD(m,'20040630') returns 20041230...
|
by: ey.markov |
last post by:
Greetings,
I have an A2K application where for a report the user enters a
month-end date, and the system must gather transactions for that month.
No problem, I thought, I'll just use the DateAdd...
|
by: David |
last post by:
The statement works fine when I use it in Access, but when I use it
from VB, I get the error "Undefined function 'Nz' in expression."
Could anyone please explain how to correct this?
Thank you.
|
by: Rich Raffenetti |
last post by:
I have the following code. If I do the dateadd function with
dateinterval.minute, it works fine and the date/time value is displayed with
zero seconds. If I do the dateadd function with...
|
by: Hugo Flores |
last post by:
Hello
I have this code in actionscript that calls javascript:
actionscript:
zoom_in = function () {
var tw1:Tween = new Tween(mc_1, "_width", Regular.easeOut,
mc_1._width, 0, 1, false);...
|
by: effendi |
last post by:
I wrote the following function and tested it in MSIE, Firefox and Mac
Safari, Works in all but the Safari. What can I do to rectify this?
function processBackground(){ for (n=1;n<11;n++)
{
...
|
by: effendi |
last post by:
Hi
I tested the following function in Safari and it doesnt work. This is
tested fine in IE.
function processOutcome(){
mainDatabase=document.forms.AssessDatabase.value
var...
|
by: tanichka |
last post by:
Hello you helpful folk! Please look at my script and tell me what I am doing wrong! I am cleaning the names of my music files from unnecessary symbols, and the cleaning works fine, however the perl...
|
by: lisa007 |
last post by:
I'm trying to use a function that will be if A nill then B and C get a value and vice verse if B nill C and A have value and the all function meant to be called right at the top of the drop down list...
|
by: metronj |
last post by:
Hello All,
Recently I was asked to make some changes to some business logic for a report generator I created for our office. Basically what I'm trying to do is this:
1)Evaluate a Date Field...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
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
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |