Complex IF Statement in a plain Access Query.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dowlingm815
    New Member
    • Feb 2010
    • 133

    #1

    Complex IF Statement in a plain Access Query.

    i have an complex IF statement, however, i am receving incorrect data when it becomes complex. the simple statement is
    Code:
    ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",[Contract Status])
    additionally, the field needs be to evaluated for "Signed, In file." if that is the case, the field will receive a value of "active contract." however, a -1 value is generated off of a text field. this was not generate when it was a simple IF statement. the code is as follows:

    Code:
    ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",[Contract Status]) Or IIf([Contract Status]="Signed, In file","Active Contract",[Contract Status])
    Any assistance would be appreciated.
  • mseo
    New Member
    • Oct 2009
    • 183

    #2
    Originally posted by dowlingm815
    i have an complex IF statement, however, i am receving incorrect data when it becomes complex. the simple statement is
    Code:
    ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",[Contract Status])
    additionally, the field needs be to evaluated for "Signed, In file." if that is the case, the field will receive a value of "active contract." however, a -1 value is generated off of a text field. this was not generate when it was a simple IF statement. the code is as follows:

    Code:
    ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",[Contract Status]) Or IIf([Contract Status]="Signed, In file","Active Contract",[Contract Status])
    Any assistance would be appreciated.
    hi,
    try this
    Code:
    ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",IIf([Contract Status]="Signed, In file","Active Contract",[Contract Status]))

    Comment

    • dowlingm815
      New Member
      • Feb 2010
      • 133

      #3
      Originally posted by mseo
      hi,
      try this
      Code:
      ContractStatus: IIf([Contract Status]="Pending Legal","Pending Waiver",IIf([Contract Status]="Signed, In file","Active Contract",[Contract Status]))
      did the trick...THANK YOU!

      Comment

      Working...