Solved

MS Access Iff statement

Posted on 2013-05-27
2
390 Views
Last Modified: 2013-05-27
Hello,

I'm trying to add the following to an unbound text box on a report, but I'm getting the error:

"The expression you entered contains invalid syntax. You may have entered an operand without an operator."


=iif([tprPractitioner]="Person 1","2644004F", iif([trpPratitioner]=
Person 2","3573683H",""))

Can you see what I'm doing wrong?

Thanks
0
Comment
Question by:dabug80
2 Comments
 
LVL 39

Accepted Solution

by:
als315 earned 500 total points
ID: 39198642
before Person 2 you have no quotes:
=iif([tprPractitioner]="Person 1","2644004F", iif([trpPratitioner]="Person 2","3573683H",""))

Open in new window

0
 
LVL 1

Author Closing Comment

by:dabug80
ID: 39198657
How silly of me. I couldn't see this. Thanks
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now