Results 1 to 3 of 3
  1. #1
    SwensrnTaz is offline Novice
    Windows XP Access 2007
    Join Date
    Dec 2011
    Posts
    3

    Exclamation Formula Issues - If then OR if then, else

    If you could assist me in the following formula, that would be great:

    Logic:
    If Project Adoption Level = 1 and if Requirements Level Inception = 6, then “Level 1”
    Or
    If Project Adoption Level = 2 and if Requirements Level Inception = 9, then “Level 2”
    Else
    “Level 0”

    Formula: (These are the formulas I have tried and either get a Syntax or Argument Error)
    =IIf([Project Adoption Level]=1,IIf([Requirements Level Inception]=6,"Level 1"),
    iif(OR([Project Adoption Level]=2,iif([Requirements Level Inception]=9),"Level 2"),
    "Level 0"))

    =IIf(OR([Project Adoption Level]=1,IIf([Requirements Level Inception]=6,"Level 1",
    iif(OR([Project Adoption Level]=2,iif([Requirements Level Inception]=9,"Level 2",
    "Level 0"))))

    =IIf(OR([Project Adoption Level]=1,IIf([Requirements Level Inception]=6,"Level 1",)
    iif(([Project Adoption Level]=2,iif([Requirements Level Inception]=9,"Level 2",)
    "Level 0"))))

    In March, I will need to add level 3 criteria, but my assumption is I can use the same logic once I get this working.

    I have not worked in Access since 2002 and nothing this significant then. I am working in Access 2007 which is also new to me. Thanks!!

  2. #2
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    =IIf([Project Adoption Level]=1,IIf([Requirements Level Inception]=6,"Level 1","Level 0"),
    iif([Project Adoption Level]=2,iif([Requirements Level Inception]=9),"Level 2","Level 0"),

    "Level 0"))

    Or you can create a Function Someling like

    Public Function SetLevel(ByRef ProjAdop as long, reqlev as long) as string

    If ProjAdop = 1 and reqlev = 6 Then
    SetLevel = "Level 1"
    Else
    If ProjAdop = 2 and reqlev = 9 then
    SetLevel = "Level 2"
    Else
    SetLevel = "Level 0"
    End if
    End if

    End function


  3. #3
    RayMilhon is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    Aug 2011
    Location
    Southern California
    Posts
    1,085
    Ok, something like not someling like. How in the he?? did I miss that?

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

Similar Threads

  1. Formula mod help
    By jcaptchaos2 in forum Access
    Replies: 2
    Last Post: 04-25-2011, 02:55 PM
  2. SQL Formula to Sum Itself
    By Scorpio11 in forum Access
    Replies: 1
    Last Post: 02-19-2011, 11:22 AM
  3. Need help creating a formula
    By Jimmy0291 in forum Queries
    Replies: 1
    Last Post: 01-17-2011, 12:12 PM
  4. Formula for form
    By chanoc24 in forum Forms
    Replies: 3
    Last Post: 08-18-2010, 10:40 PM
  5. Formula
    By hschrunk in forum Access
    Replies: 3
    Last Post: 05-18-2010, 01:40 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