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 Statement Issue
Shallena Ayers 
      
11 months ago
Expert 8, Lesson 4 right at the beginning- Adding Sales Tax to the OrderDetailQ using the IIF statement.  When I added the statement nothing happens when I click the RUN button.  If I choose to  view the Datasheet view nothing happens. If I delete the IIF statement then everything is fine.  It seems like my statement matches the statement Rick writes.
This is what I have -
SalesTax: IIf([IsTaxable],[ExtPrice]*0.06,0).
I can view SQL and this is what that looks like -
SELECT OrderDetailT.*, ProductT.ProductName, ProductT.Notes, ProductT.UnitPrice, [UnitPrice]*[Quantity] AS ExtPrice, IIf([IsTaxable],[ExtPrice]*0.06,0) AS SalesTax
FROM ProductT LEFT JOIN OrderDetailT ON ProductT.ProductID = OrderDetailT.ProductID;

Shallena Ayers OP  @Reply  
      
11 months ago

Alex Hedley  @Reply  
           
11 months ago
Do you have a screenshot of the output?
Shallena Ayers OP  @Reply  
      
11 months ago
I can show it to you without the IIF statement.  I cant do anything when the IFF statement is in there
Shallena Ayers OP  @Reply  
      
11 months ago

Shallena Ayers OP  @Reply  
      
11 months ago

Sami Shamma  @Reply  
             
11 months ago
It looks like you have a space in the field name 'Is Taxable'.
Sami Shamma  @Reply  
             
11 months ago

Sami Shamma  @Reply  
             
11 months ago
Did you get an error parameter when you run it?
Shallena Ayers OP  @Reply  
      
11 months ago
Hi Sami,  I double checked and there isnt a space.  Just to besure I retyped it in.  When I click the RUN button nothing happens.  If I choose to view the DataSheet View nothing happens.  If I close the query and then double click to open it, I see the hourglass very briefly then nothing happens.  I dont get any error messages.  I thought if I looked at the SQL I might see what the issue is but it looks okay to my totally NOT expert eyes.  Here is the SQL statement as an image.  does it mean anything that there is a number 3?
Shallena Ayers OP  @Reply  
      
11 months ago

Sami Shamma  @Reply  
             
11 months ago
Go through the.Troubleshooter
Sami Shamma  @Reply  
             
11 months ago
Try this just to eliminate possibilities.
Create two queries. The first one has only the extended price. The second one does what this one is doing.
Shallena Ayers OP  @Reply  
      
11 months ago
Hi Sami, I did the 2 separate queries  you requested and the one with the IIF statement still didnt work.  I saw at the bottom right corner of my laptop that there were updates to be installed and thought... hmmm... I wonder if that is the issue and not the IIF statement at all...So I shut everything down, did the updates... and everything works just as it should... GAH!!!  I guess it was the equivalent of pulling a Nintendo cartridge out... blowing on it... and putting it back in and now it plays just fine...  Adding restart the computer to my list of things to try before bothering everyone...  Thank you to you and to Alex for trying to help me with my issue.. I really do appreciate it!
Sami Shamma  @Reply  
             
11 months ago
Shallena You are most welcome.

Going through the troubleshooter I pointed you to earlier is very helpful. Check for updates and reboot your computer is one of them.

I spent most of my day trying to recover from a bad update three weeks ago. I finally managed to get it working after about six hours.

Same thing - connection to my SQL Server from my computer didn't work, however it works fine from my laptop. Both of them are pointing to the same database hosted on a dedicated server on the web.

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 10:51:55 AM. PLT: 1s