71 minutes ago: I made a few modifications to the website yesterday so if you see any JavaScript errors let me know. Thanks.  Dismiss
Free Lessons
Fast Tips
Topic Index
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > TechHelp > Directory > Access > IIF < Appointments | Many to Many >
Back to IIF Function    Comments List
IIF in an Update Query Upload Images   Link   Email  
Ramona Woitas 
2 years ago
Can I do this in an Update Query?

IF a Transaction is Cleared
- And the Category is office or fuel
- Then Change Cleared to False
- And AddGST to true

If so, how would I write this?
I'm scared to mess with update queries.
Any help would be appreciated.
Adam Schwanz
2 years ago
Most important thing is to make a backup of your table before you use an update query if you're testing things :). Copy/paste the table and get data and structure, then you're OK if you accidentally do something.

First make your query that only returns your values you want. Bring in the fields and put criteria for Category to be office or fuel, then on the cleared field update to false and on the addgst field update to true
Scott Axton
2 years ago
Yep I agree 100% with Adam.
Get in the routine and make it habit.   Every morning before I even open the db - I Back up the whole project.
Then through out the day as I'm making changes I make quick backups of just a single form or table or query, etc.
Especially my code.  You never know when you want to scrap what your doing and go back to the way it was.

I also echo Adam's suggestion on the query.  Make a select query first to test your IIF.  Then change it to an Update Query.

IIF  function -
Give it a shot.  If we write it and just give it to you what did you learn for next time?  You got this!  Look how far you've come.
If ya get stuck post what you have.  We'll help.

Glossary IIF Function

IIF Function
Ramona Woitas
2 years ago
Thank you Adam and Scott.  Ok I will give it a try.  :)
Ramona Woitas
2 years ago
Wooo Hooo!!! :)  

I did it!  But I did it a bit different than I had originally planned.
I added a field to my CategoryT (IsTaxable) instead, so I can use it for new transactions too.
Added a Check Marked to the Business Fields (So I didn't have to add 20 "OR" categories to the Criteria)
CalcGST (Update to True) - Criteria (IIF([IsCleared]=True, IIF([IsTaxable]=True,False))
IsTaxable Criteria to True

I can't believe it worked.  Thanks for the push Adam and Scott.
Scott Axton
2 years ago
Sweet!  Sometimes the small victories are the best.  
Glad you pushed through and figured it out.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in IIF Function.


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

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

Copyright 2024 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 2/22/2024 1:36:10 PM. PLT: 0s