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 comma comma comma
Adi 
   
12 years ago
Hello Richard,
this is how I learn about IIF from your Access Expert 8. I'd like to share with you and the class.

We use decimal comma in general arithmetic. So the "IsTaxable" value 8% is written as = 0,08 instead of 0.08

The problem is, if I write IIF([IsTaxable],[ExtPrice]*0,08,0) then access will warn me for syntax error.
So I replaced 0,08 with 8/100.

IIF([IsTaxable],[ExtPrice]*8/100,0)
well it works partially for the TRUE-part. The FALSE-part show NULL (blank) instead of 0 (zero).

When I recheck the function, somehow it turns into
IIF([IsTaxable],[ExtPrice]*8/100)
See? the False-Part simply disappears. {IIF(Condition,True,False)}

I then realize, that Access assumes the last {,0} not as the {False-Part}, but as a part of {100,0} = 100.

So i modified the IIF function into
IIF([IsTaxable],8/100*[ExtPrice],0)
Now it works perfectly as expected, although I'm not sure if it is the ideal solution for the case.
Another solution that works is, when I put 0,08 inside a bracket IIF([IsTaxable],[ExtPrice]*(0,08),0)

What will be the more elegant solution for this case? Do you have any tips about how MS Access handles comma and point as decimal marks? I'm afraid, my database will behaves differently on the other half of the world if there is no agreement about this simple issue :D


Reply from Richard Rost:

I really know very little about how other currencies are handled in Access. My experience is limited to the US and Canada. If putting the currency value inside of parentheses works, I'd just stick with that.

IIF([IsTaxable],[ExtPrice]*(0,08),0)

Seems like a reasonable solution to me.

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 12:11:40 PM. PLT: 0s