Results 1 to 3 of 3
  1. #1
    Gregory23 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    28

    Calculated field with empty field

    Hello ,



    I try to create a calculated field that sums up other fields however there are empty fields so value will not appear in the Calculated field

    Is there a way around this problem ?

    Thanks

    G

  2. #2
    cyanidem's Avatar
    cyanidem is offline Competent Performer
    Windows 10 Access 2010 64bit
    Join Date
    Nov 2015
    Location
    Consett, UK
    Posts
    270
    Modify expression in your calculated field to something like:
    Code:
    IIf(IsNull([Field1]),0,[Field1])+IIf(IsNull([Field2]),0,[Field2])...etc
    But it's rarely good idea to store calculated values, you'll be better off to use query when you want to calculate something. In query you can use Nz() function to go around null values.

  3. #3
    Gregory23 is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Nov 2015
    Posts
    28
    This code works fine

    Thank you

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

Similar Threads

  1. Replies: 1
    Last Post: 02-03-2016, 06:54 PM
  2. Replies: 2
    Last Post: 12-30-2014, 01:32 PM
  3. Replies: 12
    Last Post: 10-22-2014, 02:11 PM
  4. Replies: 1
    Last Post: 04-21-2013, 03:20 PM
  5. Calculated field (address), skipping empty lines
    By kelann in forum Programming
    Replies: 10
    Last Post: 11-02-2012, 03:08 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