Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2009
    Posts
    10

    Unanswered: IIF syntax with table records and Null

    x: IIf(IsNull([Equipment]![x]),[Equipment Compartments]![x],[Equipment]![x])
    Access reports syntax error?? I have two tables, Equip and Equip Compartments....I'm just trying to use defaults in the later if the former x value is null....thanks in advance....Al
    Last edited by cormier35; 09-18-09 at 12:33.

  2. #2
    Join Date
    May 2009
    Posts
    258
    This is because the IIf function evaluates both the truepart and the falsepart regardless of which one is actually returned. You can just use the Nz function and that will replace the IIf(IsNull(...)).

    Ax

Posting Permissions

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