Parameter query as a checkbox

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • billyqgoat
    New Member
    • Mar 2007
    • 21

    Parameter query as a checkbox

    Hi everyone -

    I apologize in advance, as a similar question has a discussion here, but I'm not exactly sure where to put the code, if it indeed requires code as it did in the older post.

    I have a database for some telephone interviews we are conducting. I want to query the database for those folks who have completed the interviews, in order to bring up their names/addresses to send them their incentive check. I want to query on a checkbox field that is checked when the interview is complete.

    I'm not familiar with the use of code... I do most of my work in design view. I have tried to add the code suggested in another post:
    SELECT[Your checkboxfield] From [Your table] Where [Your table][Your checkbox field]=True, but the error message came up that said something like "characters entered after end of SQL expression". I also tried to enter that syntax into the parameter code box in the design view, and that didn't work.

    Any guidance would be much appreciated!! Thank you!!
  • JConsulting
    Recognized Expert Contributor
    • Apr 2007
    • 603

    #2
    Originally posted by billyqgoat
    Hi everyone -

    I apologize in advance, as a similar question has a discussion here, but I'm not exactly sure where to put the code, if it indeed requires code as it did in the older post.

    I have a database for some telephone interviews we are conducting. I want to query the database for those folks who have completed the interviews, in order to bring up their names/addresses to send them their incentive check. I want to query on a checkbox field that is checked when the interview is complete.

    I'm not familiar with the use of code... I do most of my work in design view. I have tried to add the code suggested in another post:
    SELECT[Your checkboxfield] From [Your table] Where [Your table][Your checkbox field]=True, but the error message came up that said something like "characters entered after end of SQL expression". I also tried to enter that syntax into the parameter code box in the design view, and that didn't work.

    Any guidance would be much appreciated!! Thank you!!

    Code:
    select * from yourtable where yourcheckbox = -1

    Comment

    • nico5038
      Recognized Expert Specialist
      • Nov 2006
      • 3080

      #3
      It would help when you post the used SQL-text from the query editor, but the general approach to create your needed query would be to start a new query in the graphical query editor. When asked for a table select the needed table and drag and drop the needed fields from the table to the "Field" row.
      Finally enter underneath the field with the checkbox in the Criteria row:
      True

      and press the leftmost button to see the result.

      Nic;o)

      Comment

      • billyqgoat
        New Member
        • Mar 2007
        • 21

        #4
        Originally posted by nico5038
        It would help when you post the used SQL-text from the query editor, but the general approach to create your needed query would be to start a new query in the graphical query editor. When asked for a table select the needed table and drag and drop the needed fields from the table to the "Field" row.
        Finally enter underneath the field with the checkbox in the Criteria row:
        True

        and press the leftmost button to see the result.

        Nic;o)

        Thank you!!
        billyqgoat

        Comment

        Working...