?
Solved

MS Access Iff statement

Posted on 2013-05-27
2
Medium Priority
?
416 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 40

Accepted Solution

by:
als315 earned 2000 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes two methods for creating a combo box that can be used to add new items to the row source -- one for simple lookup tables, and one for a more complex row source where the new item needs data for several fields.
AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
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…
Suggested Courses

770 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