Results 1 to 9 of 9
  1. #1
    DPRapson is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2021
    Posts
    7

    2 Checkboxes, Only Show record if 1 or both are checked. Do Show record if Both unchecked. version 2

    Hi All,



    Referring to the attached image. I would like to create a query that will the records where 1 or both of the checkboxes are checked:

    Click image for larger version. 

Name:	Untitled-1.jpg 
Views:	30 
Size:	220.3 KB 
ID:	45431

    This is what I have:

    Select [TblLid].[LidBrdSek], [TblLid].[LidOpBew] From [TblLid] Where [TblLid].[LidBrdSek]="True" And ([TblLid].[LidOpBew]="True")
    Select [TblLid].[LidBrdSek], [TblLid].[LidOpBew] From [TblLid] Where [TblLid].[LidBrdSek]="False" And ([TblLid].[LidOpBew]="True")
    Select [TblLid].[LidBrdSek], [TblLid].[LidOpBew] From [TblLid] Where [TblLid].[LidBrdSek]="True" And ([TblLid].[LidOpBew]="False")

    Can somebody assist with this criteria?

    Thank you,

    Dave Rapson

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Try the first query but change And to Or.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    Gicu's Avatar
    Gicu is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jul 2015
    Location
    Kelowna, BC, Canada
    Posts
    4,101
    Or maybe try this:

    Select [TblLid].* From [TblLid] Where [TblLid].[LidBrdSek]+[TblLid].[LidOpBew]<>0;

    Cheers,
    Vlad Cucinschi
    MS Access Developer
    http://forestbyte.com/

  4. #4
    DPRapson is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2021
    Posts
    7
    Quote Originally Posted by pbaldy View Post
    Try the first query but change And to Or.
    Thsnks Paul. Still struggling with syntax messages. Will keep you posted.

  5. #5
    DPRapson is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2021
    Posts
    7
    Quote Originally Posted by Gicu View Post
    Or maybe try this:

    Select [TblLid].* From [TblLid] Where [TblLid].[LidBrdSek]+[TblLid].[LidOpBew]<>0;

    Cheers,

    Thank you Vlad,

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Quote Originally Posted by DPRapson View Post
    Thsnks Paul. Still struggling with syntax messages. Will keep you posted.
    Just noticed the quotes around True; you dont want those.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    On a computer now, what I'm suggesting is:

    Select [TblLid].[LidBrdSek], [TblLid].[LidOpBew] From [TblLid] Where [TblLid].[LidBrdSek]=True Or [TblLid].[LidOpBew]=True

    You can also test for -1, which is how Access stores True.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  8. #8
    DPRapson is offline Novice
    Windows 10 Office 365
    Join Date
    Jun 2021
    Posts
    7
    Quote Originally Posted by pbaldy View Post
    On a computer now, what I'm suggesting is:

    Select [TblLid].[LidBrdSek], [TblLid].[LidOpBew] From [TblLid] Where [TblLid].[LidBrdSek]=True Or [TblLid].[LidOpBew]=True

    You can also test for -1, which is how Access stores True.

    Hi Paul,

    Thank you. Sorry for the late response I have been down with the Flu. The OR statement works.

    Regards,

    Dave

  9. #9
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Glad it worked for you.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 4
    Last Post: 06-04-2021, 05:47 AM
  2. Replies: 9
    Last Post: 04-09-2020, 04:15 PM
  3. Replies: 23
    Last Post: 05-04-2018, 04:50 AM
  4. Replies: 2
    Last Post: 04-19-2018, 03:51 PM
  5. Replies: 2
    Last Post: 03-14-2017, 02:48 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