Solved

MS Access Iff statement

Posted on 2013-05-27
2
402 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 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

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

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

It’s the first day of March, the weather is starting to warm up and the excitement of the upcoming St. Patrick’s Day holiday can be felt throughout the world.
Traditionally, the method to display pictures in Access forms and reports is to first download them from URLs to a folder, record the path in a table and then let the form or report pull the pictures from that folder. But why not let Windows retr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

695 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