Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Queries / July 2006

Tip: Looking for answers? Try searching our database.

IIF Statement fustration

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
kate - 06 Jul 2006 10:27 GMT
Can you please help me with IIF statement below it accepts it but it doesnt
run with correct data what am I doing wrong??????
Thankyou what would I do without you!!!!
Kate

Return Outcome: IIf([DischSpec]=[ReAdmitSpec] & [Disch Cons]<>[ReAdmit
Cons],"Returned to same Specialty within 28
Days",IIf([DischSpec]=[ReAdmitSpec] & [Disch Cons]=[ReAdmit Cons],"Returned
to same Specialty and Cons within 28 Days",IIf([DischSpec]<>[ReAdmitSpec] &
[Disch Cons]=[ReAdmit Cons],"Returned to same Cons within 28 Days","Returned
to Different specialty and Different Consultant within 28 Days")))
John Spencer - 06 Jul 2006 12:30 GMT
Replace the "&" with "And".

Those two operators do different things.  "&" combines two values into a
string, while "and" combines the two tests using boolean logic to return
True or False.

Return Outcome: IIf([DischSpec]=[ReAdmitSpec] AND
[Disch Cons]<>[ReAdmit Cons],
"Returned to same Specialty within 28 Days",
IIf([DischSpec]=[ReAdmitSpec] AND [Disch Cons]=[ReAdmit Cons]
,"Returned to same Specialty and Cons within 28 Days",
IIf([DischSpec]<>[ReAdmitSpec] AND [Disch Cons]=[ReAdmit Cons]
,"Returned to same Cons within 28 Days"
,"Returned to Different specialty and Different Consultant within 28
Days")))

> Can you please help me with IIF statement below it accepts it but it
> doesnt
[quoted text clipped - 11 lines]
> Days","Returned
> to Different specialty and Different Consultant within 28 Days")))
kate - 06 Jul 2006 12:39 GMT
> Replace the "&" with "And".
>
[quoted text clipped - 29 lines]
>
> thankyou it worked
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.