Results 1 to 3 of 3
  1. #1
    Vegaanders is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2016
    Location
    Cyprus
    Posts
    29

    If one works, the other dont.

    Hi All!



    I have two problems left on my pay slip report that I think is connected.

    One field on the report is expenses. If this field is empty the label is hidden. That how it should work.

    I also have a field that calculates the net paid out salary.

    The code looks like this

    Code:
    ([Salary_Euro]+[Expences_Euro])-[Admin_Fee_Euro]
    Now, if the expense field is Null, nothing shows up, if the expense field is set to default 0, then all is OK. The problem is that the expense field now shows all the time, which of course is normal because the value is not Null.

    Can the code for the expense field somehow be changed to also ignore the 0

    Code is here

    Code:
     =IIf(IsNull([Expences_Euro]),"","Expenses:")

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,549
    prevent nulls by converting fields to zero with:

    =NZ([Salary_Euro])+nz([Expences_Euro])-nz([Admin_Fee_Euro])

  3. #3
    Vegaanders is offline Novice
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jun 2016
    Location
    Cyprus
    Posts
    29
    Solved it!
    Thank you

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

Similar Threads

  1. Replies: 1
    Last Post: 06-21-2015, 07:58 AM
  2. vba code dont work
    By mikichi in forum Programming
    Replies: 7
    Last Post: 11-12-2013, 01:59 PM
  3. Replies: 12
    Last Post: 09-04-2013, 02:51 AM
  4. Where two things DONT match
    By stephenaa5 in forum Queries
    Replies: 3
    Last Post: 11-09-2012, 03:51 PM
  5. Oat-so-simple but i dont have a clue
    By turbo910 in forum Forms
    Replies: 13
    Last Post: 11-26-2009, 12:28 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