Update Query Only Recognizes Yes/No as No

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mcupito
    Contributor
    • Aug 2013
    • 294

    Update Query Only Recognizes Yes/No as No

    Hello, all.

    I am running a MOD to update the fields in two tables. It calls two queries that update based on the Yes/No field data type for either primary, or secondary.

    The table has three primary keys (ElectionID, PlanID, and PrimaryElection ). The situation I am running into happens to only recognize the "No" data type when running the query, thus it returns the wrong data. It also is failing to recognize the other value of ElectionID (there are 2 records, 1 and 2)

    I'm going to attach images of the query in design view and query results.

    Does anyone know what I could do to fix this issue? The solution I thought of was using all three of those fields as keys, which has not done the trick. I have also tried entering in the criteria field "Yes" or "No" to no avail.

    Note: I also tried "-1 And <> 0" and "-1" and "Yes" all which did not work.

    Thanks.

    [imgnothumb]http://bytes.com/attachment.php? attachmentid=73 30[/imgnothumb]
    [imgnothumb]http://bytes.com/attachment.php? attachmentid=73 31[/imgnothumb]
    [imgnothumb]http://bytes.com/attachment.php? attachmentid=73 32[/imgnothumb]
    Attached Files
    Last edited by zmbd; Nov 21 '13, 06:38 PM. Reason: [z{placed images inline}]
  • zmbd
    Recognized Expert Moderator Expert
    • Mar 2012
    • 5501

    #2
    In the design view:
    Remove the -1 etc
    Replace with "True" , ofcourse, without the quotes, (^-^)
    Re-run your query
    Let us know the results.

    Comment

    • mcupito
      Contributor
      • Aug 2013
      • 294

      #3
      Hey, Z. Thanks for your reply. It did not update any rows.

      Comment

      • mcupito
        Contributor
        • Aug 2013
        • 294

        #4
        There must have been a bug in the system. I re-created the queries and it now works. Thanks, Z, for your reply.

        Comment

        • zmbd
          Recognized Expert Moderator Expert
          • Mar 2012
          • 5501

          #5
          Either that would have been my next step or a reboot of the PC.

          I've been reworking the GUI for one of my DB... the main form works quite well, all of the sudden, it quit working. Closed everything, cold-booted the pc, and started up and the form hasn't choked since.

          Comment

          • mcupito
            Contributor
            • Aug 2013
            • 294

            #6
            Really? I actually had to recreate 3 different forms on my last database for no reason. I went to add another field and poof, it would say there wasn't enough memory allocated to do the tasks I was performing. A tricky thing Access can be!

            Comment

            • zmbd
              Recognized Expert Moderator Expert
              • Mar 2012
              • 5501

              #7
              We're off topic here... however,
              the memory thing, rebuilding databases, and the wierdness have some co-dependance; thus, maybe, the following is the root cause:

              ACC2000 thur ACC2010 suffer:
              ----------
              Failures caused by Name AutoCorrect
              This feature was introduced in Access 2000. It tries to help users who rename a table field, so that queries, forms and reports automatically recognise the new field name. Microsoft has addressed some of the problems with this feature, but is it still buggy, incomplete, and a performance problem.

              The workaround is to turn the feature off:

              •In Access 2010, click File | Options | Current Database, and scroll down to Name AutoCorrect Options.
              •In Access 2007, click the Office Button | Access Options | Current Database, and scroll down to Name AutoCorrect Options.
              •In Access 2000 - 2003, the Name AutoCorrect boxes are under Tools | Options | General.
              You must remember to do this every time you create a database, preferably before creating any other objects.

              (Note: this is not the same as AutoCorrect for spelling, which has none of these problems.)
              ----------
              The emphasizes is mine.

              You should follow the link and read thru the issues. (^_^)

              Comment

              Working...