Consulting

Results 1 to 2 of 2

Thread: SQL problem with Null

  1. #1
    VBAX Regular
    Joined
    Jul 2004
    Location
    Sykesville, Maryland
    Posts
    53
    Location

    SQL problem with Null

    I have an Access 2007 query with the following line of code:

    IIf([tblmaster].[PLATOONID]=20 Or [tblmaster].[ID]=485,"FREE",[tblDuesYearsLKU].[DuesYears]) AS SWITCH

    This code works fine unless there is a Null Value and what I do not know how to do is modify the code to use the IfNull parameter.

    Any help will be appreciated.
    Thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    IIf(IsNull([tblmaster].[PLATOONID]) Or IsNull([tblmaster].[ID]) Or [tblmaster].[PLATOONID]=20 Or [tblmaster].[ID]=485,"FREE",[tblDuesYearsLKU].[DuesYears]) AS SWITCH
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

Posting Permissions

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