Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    This should be an easy query but it does not work (97)

    I want to run an update query to change the value of one field [Solution] to "A" if another field [MCCountsA] has a value of 100. [Solution] is text and [MCCountsA] is numeric. I create an update query with one field, [Solution] in it. I gave the query a new value of "A" and a criteria of:

    [MCCountsA] = 100

    Or at least I tried to. It kept changing the above to:

    [MCCountsA] = "100"

    and then would give me (naturally) a type mismatch when I tried to run the query. What am I doing wrong?


    Ronny
    Ronny Richardson

  2. #2
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: This should be an easy query but it does not w

    You need to add [mmCountsA] as a second field in the query and put the criteria against that field, but leave its update to line blank.
    I attach a screen shot of something similar.
    Attached Images Attached Images
    Regards
    John



  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: This should be an easy query but it does not work (97)

    You can't place a condition for one field in the criteria for another field. Remove the condition for the Solution field.

    You must add the field MCCountsA to the query grid. Leave the "Change to" line empty for this field, and simply enter 100 in the "Criteria" line for this field.

  4. #4
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Atlanta
    Posts
    568
    Thanks
    7
    Thanked 1 Time in 1 Post

    Re: This should be an easy query but it does not w

    That got it, thanks a bunch.


    Ronny
    Ronny Richardson

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •