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 / October 2006

Tip: Looking for answers? Try searching our database.

IIF Statement getting error message...what's wrong?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Karen - 04 Oct 2006 21:46 GMT
I want to create a new field (DBE/SBE Goal) in a query based on information
in existing fields (DBE % & SBE %).

How do I write the expression to get the following result: If there is a
figure in the DBE % field, give me that figure followed by "% DBE" and/or if
there is a figure in the SBE% field, give me that figure followed by "% SBE".
In short, if both fields have data, give me both, otherwise give me what's
in either field, if both are empty, give me "None set".

I've tried this expression:
IIf(Len([DBE %] & "") > 0, IIf(Len([SBE %] & "")>0, [DBE %] & " %DBE, " &
[SBE %] & " % SBE", [DBE %] & " %DBE"), [SBE %] & " % SBE", "None set')

I keep getting a error message.  Please advise.
Signature

Thanks, Karen

Douglas J. Steele - 04 Oct 2006 22:26 GMT
Already answered. These newsgroups are manned by unpayed volunteers.
Sometimes it takes a little time to get an answer.

Signature

Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no private e-mails, please)

>I want to create a new field (DBE/SBE Goal) in a query based on information
> in existing fields (DBE % & SBE %).
[quoted text clipped - 12 lines]
>
> I keep getting a error message.  Please advise.
Karen - 05 Oct 2006 21:40 GMT
Thanks Douglas...sorry for my impatience.  I thought the individuals
answering the query-specific questions, had greater expertise in querying,
that's why I posed the question here as well.
Signature

Thanks, Karen

> Already answered. These newsgroups are manned by unpayed volunteers.
> Sometimes it takes a little time to get an answer.
[quoted text clipped - 15 lines]
> >
> > I keep getting a error message.  Please advise.
 
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.