Results 1 to 7 of 7
  1. #1
    geocan2006 is offline Advanced Beginner
    Windows 10 Access 2010 32bit
    Join Date
    May 2016
    Posts
    34

    Expression Builder

    Hi, I am new to Access and I need to build an expression based on below criterias, the expression will result as Active or Inactive based on variables in column A and Collumn B
    Column A Column B Result
    Active Active Active
    Active Inactive Active
    Inactive Inactive Inactive
    Inactive Active Inactive



    Thank you
    George

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    How would you define the rules? Based on your example, the result is the same as whatever is in column A.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    nhorton79 is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    34
    Pbaldy is right. It appears that the result is based on whatever the value of column A is.

    If however, line 2 had a result of inactive then it would be something like
    result: iif([columna] or [columnb] = "Inactive","Inactive","Active")


    Sent from my iPhone using Tapatalk

  4. #4
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    I think it would be:
    Code:
    IIF(([columna] = "Inactive") or ([columnb] = "Inactive"),"Inactive","Active")

  5. #5
    nhorton79 is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    34
    Quite right ssanfu. My bad


    Sent from my iPhone using Tapatalk

  6. #6
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,518
    I'll get out of the way.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  7. #7
    nhorton79 is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Apr 2015
    Posts
    34
    Sorry pbaldy. Didn't mean to step on any toes. Just thought I might put in my two cents...


    Sent from my iPhone using Tapatalk

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 4
    Last Post: 05-03-2016, 01:51 PM
  2. expression builder
    By frustratedwithaccess in forum Access
    Replies: 7
    Last Post: 11-12-2014, 09:15 AM
  3. Replies: 2
    Last Post: 11-20-2012, 03:21 AM
  4. Expression Builder or VB ... Help
    By Adynn in forum Access
    Replies: 0
    Last Post: 06-03-2011, 09:51 AM
  5. Expression builder
    By PJ_d_DJ in forum Access
    Replies: 2
    Last Post: 02-24-2011, 03:38 AM

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