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 Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
IIF
Thomas Colley 
     
2 years ago
I have 3 Fields, Qty, QtyReceived and ProductReceived. ProductReceived is a Yes/No check box. I am trying to use the Iif to check ProductReceived when Qty and QtyReceived are equal. I can get it to input Yes or No/Partial but not check the box. This is what i got.
ProductReceived: IIf([Quantity]=[QtyReceived],"Yes","No/Partial")
Thank you
John Davy  @Reply  
         
2 years ago
Think about what you want to do
If a certain condition is met then
'******you want to do something
Endif

HTH
John
Kevin Robertson  @Reply  
           
2 years ago
Use Boolean values (True/False) not String values.
    ProductReceived: IIf([Quantity]=[QtyReceived],True,False)
Thomas Colley OP  @Reply  
     
2 years ago
Kevin, This turns the field to -1 in the query but does not check the box in the form
Alex Hedley  @Reply  
           
2 years ago
Access SQL or MS SQL?
Thomas Colley OP  @Reply  
     
2 years ago
Access
Kevin Robertson  @Reply  
           
2 years ago
Screenshots of Query and Form?
Thomas Colley OP  @Reply  
     
2 years ago

Thomas Colley OP  @Reply  
     
2 years ago
SELECT CribPODescription1T.QtyReceived, CribPODescription1T.Quantity, IIf([Quantity]=[QtyReceived],True,False) AS ProductReceived, CribPODescription1T.POID, CribProductT.CLCPartNumber, CribProductT.Description, CribPODescription1T.PartNumber, CribPODescription1T.CLCProductID, CribPODescription1T.ProductReceived1
FROM CribPODescription1T LEFT JOIN CribProductT ON CribPODescription1T.CLCProductID = CribProductT.CribProductID;
Kevin Yip  @Reply  
     
2 years ago
Your ProductReceived field is in a *table*.  To enter true/false values into the table, this is not how you do it.  Making a query that calculates the true/false as you have done does *not* automatically enter the true/false value into the table -- because the table isn't "aware" that you've run the query.  To have a query actually update a table, you need to use an update query.
Thomas Colley OP  @Reply  
     
2 years ago
OK, Was kind of afraid of that.  Thanks everyone for your help

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

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: 5/8/2026 6:08:51 AM. PLT: 1s