Free Lessons
Fast Tips
Topic Index
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
Home > Forums > Access
Access Forum

Back to Access Forum

Triple State Check boxes Upload Images   Link  
Michael Duncan 
3 months ago
Hi guys I am building a movie database.  I have a continuous form with all my titles on it including wish list and collection.  I would like to use a triple state check box to view either list.  My record source for the form is a table.  How do I code the check box this way?

Thank You
Juan C Rivera
3 months ago
Access SQL Seminars

You will need to set up conditions on the status of the checkbox, then apply the SQL with a requery.  
Dim strSQL As String
strSQL = "SELECT * FROM ..."

If (Check199) Then
  strSQL = strSQL & "WHERE Status IN (x, y)"
  strSQL = strSQL & "WHERE Status IN (z, a)"
End If

Me.RecordSource = strSQL

This is covered in the SQL Seminar

you can thank Alex this was done by him about 8 years ago.  

Gregory Clancey
3 months ago
Am I slow, or do I see only 2 conditions here -- cheque: TRUE / cheque: FALSE.
I may be failing to see how the 3rd condition directs program flow.

(note: The answer to my "Am I slow" question, above, may be self-evident.)
Kevin Robertson
3 months ago

This is how I would normally use a Triple State Check Box in this situation.

True: Show one list
False: Show the other list
Null: Show both lists
Gregory Clancey
3 months ago
Thanks. I'll work with this to gain familiarity.

So TRUE is chequed, FALSE is the empty box and NULL is a box with gray fill; and, we can inspect this state of the control to make the appropriate code branching.
Gregory Clancey
3 months ago
Sorry -- NULL is the box with the black fill. Once the control has been chequed, it can easily toggle between TRUE and FALSE via the spacebar, but is it possible to get back to NULL?
Juan C Rivera
3 months ago
if you click on it it will toggle thru the 3 null, true, false.  I myself like radio buttons.
Gregory Clancey
3 months ago
Thanks, Juan.
Got it!

Rich has a great TechHelp vid. So, to enable the triple-state toggle the control must be bound to a Long Integer, Numeric table field (not the typical Boolean type) with a default of "NULL" and "Required Property" set to "No."

Typing this message will give me a quick place to refresh my memory in future. Also, others who happen upon this can become informed as well. Thanks again.
Scott Axton
3 months ago
Check out the article on Allen Browne's website. Why I stopped using Yes/No fields

He has not updated the site for over 10 years but there are lots of valuable little tidbits there.  Scroll all the way to the bottom and click the Home link to view more.

This thread is now closed. If you wish to comment, start a NEW discussion, below.

Back to Access Forum Comments

Start a NEW Conversation
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
Subscribe to Access Forum
Get notifications when this page is updated

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 2023 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 12/8/2023 3:06:49 AM.