Results 1 to 4 of 4
  1. #1
    AnneForumer is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Aug 2016
    Posts
    20

    How to update multiple columns based on different criteria

    Can I update multiple columns based on different criteria in one update query? How to set it up in QBE?



    Name Height Weight Basketball Football
    Bob 75 149 Yes No

    Set Basketball to Yes if height is over 70 and No otherwise
    Set Football to Yes if weight over 200 and No otherwise.

    Thank you!

  2. #2
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I think you can use an IIf() formula in the "update to" row.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    AnneForumer is offline Novice
    Windows 10 Access 2013 32bit
    Join Date
    Aug 2016
    Posts
    20
    Thank you. Did exactly what I wanted.

  4. #4
    pbaldy's Avatar
    pbaldy is online now Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    Happy to help!
    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: 3
    Last Post: 08-09-2016, 01:52 PM
  2. Replies: 3
    Last Post: 06-21-2013, 09:06 AM
  3. Replies: 7
    Last Post: 01-02-2013, 11:23 PM
  4. Replies: 2
    Last Post: 05-17-2012, 03:52 PM
  5. show / hide columns based on criteria?
    By stevepcne in forum Access
    Replies: 1
    Last Post: 11-18-2011, 02:49 PM

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