Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / November 2004

Tip: Looking for answers? Try searching our database.

How to show both Yes/No in a query?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PerryC - 09 Nov 2004 14:35 GMT
I have a query and a InputForm.  

Query:
Field1 (Yes/No)
Forms![InputForm].[CheckBox]

What I wanted: If user do not click CheckBox, Query will show ONLY the
No records; however, if Users check that Checkbox, it shows BOTH the
YES/NO records.  (Bear with me on this poor explaination)

Sincerely,
Perry
Steve Jorgensen - 09 Nov 2004 14:45 GMT
>I have a query and a InputForm.  
>
[quoted text clipped - 8 lines]
>Sincerely,
>Perry

To do it with a single query, the key is that you always want No records, so
the condition is that the record is No or the checkbox is unchecked.  That
means a record will only be excluded if it is Yes, and the checkbox is
unchecked.

SELECT tblMyTable.* FROM tblMyTable WHERE tblMyTable.Field1=False OR
[Forms]![InputForm].[CheckBox]=False
Perry Cheng - 09 Nov 2004 17:06 GMT
Thanks a lot.  That works perfectly.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.