Results 1 to 5 of 5
  1. #1
    ChristopherL is offline Novice
    Windows XP Access 2002
    Join Date
    Jul 2013
    Posts
    18

    Do not use value!

    Hi!
    I want to make a copy table where I copy all the values from a database and filter out the values that I want.

    In one of the columns theres a number value that can't be changed manually to text, for that value I want to convert it and ignore the null values.

    So I only want to show the values that are visible.

    I tried with TRY: IIf([PQ_OPTIONVAL_D]=Null;0;Val([PQ_OPTIONVAL_D]))



    But what can I use instead of "0" to just ignore it?
    Right now it just shows #error but I dont even want the record to show.

    Many thanks
    / C

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    =Null won't work, ever. Review: http://allenbrowne.com/casu-12.html see Error 5.

    To exclude all records where PQ_OPTIONVAL_D is Null, just restrict the query to select records that are not Null - in the Criteria row under PQ_OPTIONVAL_D: Not Is Null
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    ChristopherL is offline Novice
    Windows XP Access 2002
    Join Date
    Jul 2013
    Posts
    18
    Quote Originally Posted by June7 View Post
    =Null won't work, ever. Review: http://allenbrowne.com/casu-12.html see Error 5.

    To exclude all records where PQ_OPTIONVAL_D is Null, just restrict the query to select records that are not Null - in the Criteria row under PQ_OPTIONVAL_D: Not Is Null
    Many thanks, however since I am going to use iff statement to change the text to number if its not null? How do I add that in an iif statement?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,633
    Try (no IIf):

    Val(Nz([PQ_OPTIONVAL_D],0))
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  5. #5
    ChristopherL is offline Novice
    Windows XP Access 2002
    Join Date
    Jul 2013
    Posts
    18
    Quote Originally Posted by June7 View Post
    Try (no IIf):

    Val(Nz([PQ_OPTIONVAL_D],0))
    Worked perfectly!!
    Thanks!

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

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