Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
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
Upload Images   @Reply   Bookmark    Link   Email  
IIF in an Update Query
Ramona Woitas 
      
3 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  @Reply  
            
3 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  @Reply  
          
3 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 OP  @Reply  
      
3 years ago
Thank you Adam and Scott.  Ok I will give it a try.  :)
Ramona Woitas OP  @Reply  
      
3 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  @Reply  
          
3 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.
 

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 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 5/22/2025 7:58:41 PM. PLT: 2s