Multiple IIF and Null values in dates

rrtpeds

Registered User.
Local time
Today, 00:57
Joined
Apr 17, 2008
Messages
11
So i am trying to create a box that will display whether a new care plan is needed for patients. Right now waht I have the background doing is i have one box that displays the current date. A second box where you place in the date of the last care plan and a third calculated box. that words by using the date difference function between the current date and the date typed in. Then the care plan box uses IIF statment to display " Need New Care Plan" if the difference is greater then -7. This part workds great. My problem is I also need it to display if the value in the date difference function is blank. If I use this string
=IIf([text14]<-7,"Need New Care Plan",IIf([text 14]=null,"Needs New Care Plan","")) The Object doesn't contain the automation object text 14. The component doesn['t make the property or method avaiable for automation operations. So how would i write this statement so it would work. VBA is not an option i suck at it

thanks for the read
chris benitez
 
So i am trying to create a box that will display whether a new care plan is needed for patients. Right now waht I have the background doing is i have one box that displays the current date. A second box where you place in the date of the last care plan and a third calculated box. that words by using the date difference function between the current date and the date typed in. Then the care plan box uses IIF statment to display " Need New Care Plan" if the difference is greater then -7. This part workds great. My problem is I also need it to display if the value in the date difference function is blank. If I use this string
=IIf([text14]<-7,"Need New Care Plan",IIf([text 14]=null,"Needs New Care Plan","")) The Object doesn't contain the automation object text 14. The component doesn['t make the property or method avaiable for automation operations. So how would i write this statement so it would work. VBA is not an option i suck at it

thanks for the read
chris benitez


Try to see if this works:

Code:
IIf[B][COLOR=darkorange]([/COLOR][COLOR=royalblue]([/COLOR][COLOR=red]([text14]<-7)[/COLOR][/B] [COLOR=royalblue][B]Or[/B][/COLOR] [B][COLOR=red](IsNull([text14])[/COLOR][COLOR=royalblue])[/COLOR][/B],"Needs New Care Plan",""[B][COLOR=darkorange])[/COLOR][/B]
 
No thanks for the try no error message but get a #name# message in the box
 
Try

IIf([text14]<-7 Or IsNull([text14]),"Needs New Care Plan","")

Brian
 
No thanks for the try no error message but get a #name# message in the box

I appear to have left off a leading "=" in my example. Did you add it back? If not try it again

Code:
[COLOR=red][B]=[/B][/COLOR]IIf[B][COLOR=darkorange]([/COLOR][COLOR=royalblue]([/COLOR][COLOR=red]([text14]<-7)[/COLOR][/B] [COLOR=royalblue][B]Or[/B][/COLOR] [B][COLOR=red](IsNull([text14])[/COLOR][COLOR=royalblue])[/COLOR][/B],"Needs New Care Plan",""[B][COLOR=darkorange])[/COLOR][/B]
 
nope same #name? I think it has to be something about calling it a date diff function in the box trying to be evaluated
 
thanks for the help. I ended up placing it all in the query for the subform and then giving a name. it did have all to do with that difference part of the equation on the text 14
 
Yes True, sorry about that got hung up on correcting rookie's () error and didn't read post 1, my bad.

Brian
 

Users who are viewing this thread

Back
Top Bottom