Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Expert 8    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
IIF function income expense
Pru Hewett 

12 years ago
Hi Richard.  I'm trying to create an IIF function where, if the data in my column headed IncomeExpense is Expense, the amount in my Amount column is changed to a negative figure.  Following your Expert Level 8 lesson 4, I have typed in: IIF([IncomeExpense]=[Expense],[Amount]*-1). When I run it, a popup box asks for the parameter value of IncomeExpense.  Where am I going wrong please?


Reply from Richard Rost:

Well, is IncomeExpense a TEXT field that says "Expense"? If so, you'd need:

IIF(IncomeExpense="Expense",Amount*-1,Amount)

If you put something like that in [brackets] then you're telling Access it's a FIELD NAME. You don't need the brackets if your field names don't have spaces in them (which is what I teach in the very first Beginner lessons). However, if you want the VALUE of the data in that field, you CAN'T use brackets.

I'd recommend a Yes/No field. Make YES an income and NO an expense. Then you could just say:

IIF(IncomeExpense,Amount,Amount*-1)

The field will evaluate to TRUE or FALSE based on it's value and you'll get either the Amount or it's negative.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Expert 8.
 

Next Unseen

 
New Feature: Comment Live View
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 6:53:25 PM. PLT: 0s