Delete Query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • f3dde
    New Member
    • Nov 2006
    • 19

    #1

    Delete Query

    Hi guys, I've got a (for you) pretty simple question.
    I am making an Access database (2003) for school. It contains information about stuff you can hire here.

    In the table which I use to register all the stuff given out I have a checkbox. This is checked when the loaned stuff is returned.

    The query looks as following:

    Field: "Terug gebracht? (Ja / Nee)"
    Table: "Uitlenen"
    Delete: "Where"
    Criteria: " "

    I have no clue about the criteria.. Can anyone tell me what I should put in there, in order to only delete the Checked records, and not all records?

    Thanks for your help, and if you need more info, please say so.
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    In the criteria, you would put "Ja", no quotes. Run a select query first to be sure it selects the right files.

    Comment

    • f3dde
      New Member
      • Nov 2006
      • 19

      #3
      I've tried what you said, but when running the query (both select and delete) I'm getting a popup telling me I have Incorrect data input.

      I've called the record "Terug gebracht (Ja / Nee)" This is a checkbox.
      It should be Ja when checked, Nee when it's not checked.

      So the "Ja" in the criteria doesn't work.
      Any other idea's?

      Comment

      • Rabbit
        Recognized Expert MVP
        • Jan 2007
        • 12517

        #4
        Well, I don't know about how different languages work but for the english version you would put either Yes or True. So maybe they keep the same thing for different languages. Try Yes or True.

        Comment

        • NeoPa
          Recognized Expert Moderator MVP
          • Oct 2006
          • 32669

          #5
          Originally posted by f3dde
          I've tried what you said, but when running the query (both select and delete) I'm getting a popup telling me I have Incorrect data input.

          I've called the record "Terug gebracht (Ja / Nee)" This is a checkbox.
          It should be Ja when checked, Nee when it's not checked.

          So the "Ja" in the criteria doesn't work.
          Any other idea's?
          Did you use Ja as suggested or did you try "Ja"?

          As an alternative, try pasting the following into the SQL view of your query :
          Code:
          DELETE
          FROM [Uitlenen]
          WHERE [Terug gebracht? (Ja / Nee)]

          Comment

          Working...