Results 1 to 4 of 4
  1. #1
    avicknair is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    3

    True/False Check Box Usage in Forms

    Hello All,



    I am not extremely experienced in Access, a little work here and there. I am looking to create a small database where I can search through past jobs completed at my work. I want to be able to assign a sort of keyword to them so I have added a true/false check box and column for each keyword that I have thought of on my data table. If a past job had a chiller and a heat exchanger on it I'd like to be able to check those two boxes and in the future be able to check "chiller" and "heat exchanger" on my form and get the jobs that have those two things on them spit out through the query to me.

    My problem is that I am having trouble with the criteria that it takes to run something like this. I have seen that if you just put "yes" in the criteria that it should work but I have had little success with that option. If you have any questions please reply and I'll get back to you! Thank you in advance guys.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    What does 'little success' mean - error message, wrong results, nothing happens? How does checking boxes on form apply filter to query? Controls used to input filter parameters must be UNBOUND.

    Constructing filter criteria that includes multiple yes/no fields as well as other field types can be very frustrating. If you use AND operator, it should work if you manually input fixed parameters directly in query. But if you want to use OR, then it becomes virtually impossible to build with the query designer.

    However, if you are using dynamic parameterized query that references UNBOUND controls on form, then this will likely fail to produce desired output.

    Post your attempted query SQL statement.

    If you want to provide db for analysis, follow instructions at bottom of my post.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    avicknair is offline Novice
    Windows 8 Access 2013
    Join Date
    Oct 2015
    Posts
    3
    Here is a copy of my database. As you will be able to see, I have a data table with two example jobs that will later be populated with 50 ish along with 5 keywords for search criteria that will later have around 30. In the query, there is text criteria pieces that I am able to cover myself in the criteria, it is only the true/false ones that I am having trouble with.
    Attached Files Attached Files

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,954
    Including the table in the query more than once serves no purpose. You did not show any filter parameters so I have no idea what you tried and failed.

    I added some records and selected multiple jobs for one. This query works:

    SELECT DataTable.[Estimate ID], DataTable.[Estimate Name], DataTable.Location, DataTable.Year, DataTable.[File Path], DataTable.ACC, DataTable.Biomass, DataTable.Catalyst, DataTable.Chillers, DataTable.CTG
    FROM DataTable
    WHERE (((DataTable.Biomass)=True) AND ((DataTable.Chillers)=True));

    Use VBA to construct WHERE clause from the form selections. Review http://www.allenbrowne.com/ser-62.html

    The embedded macro does nothing but open an unfiltered query. Don't open query. Apply filter to a form or open a filtered report.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 8
    Last Post: 10-06-2014, 03:02 PM
  2. True And False
    By azhar2006 in forum Forms
    Replies: 4
    Last Post: 12-23-2013, 03:50 AM
  3. Currency fields and if to get true/false
    By Ruegen in forum Programming
    Replies: 1
    Last Post: 09-29-2013, 07:40 PM
  4. Yes/No True/False
    By DSTR3 in forum Access
    Replies: 5
    Last Post: 12-04-2010, 05:56 PM
  5. True or false
    By tleec in forum Queries
    Replies: 1
    Last Post: 02-01-2008, 10:41 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums