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;
I can show it to you without the IIF statement. I cant do anything when the IFF statement is in there
Shallena AyersOP
@Reply 17 months ago
Shallena AyersOP
@Reply 17 months ago
Sami Shamma
@Reply 17 months ago
It looks like you have a space in the field name 'Is Taxable'.
Sami Shamma
@Reply 17 months ago
Sami Shamma
@Reply 17 months ago
Did you get an error parameter when you run it?
Shallena AyersOP
@Reply 17 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?
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 AyersOP
@Reply 17 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!
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.
Sorry, only students may add comments.
Click here for more
information on how you can set up an account.
If you are a Visitor, go ahead and post your reply as a
new comment, and we'll move it here for you
once it's approved. Be sure to use the same name and email address.
This thread is now CLOSED. If you wish to comment, start a NEW discussion in
Access Expert 8.