Share via

Formula Error in Access Database

Anonymous
2018-07-05T16:52:53+00:00

HI,

I have wrritten formula some of the records are showing #Num! error. Can some help me. Below example for your reference.

Name Salary Loss of Pay Salary-Incentive % of salary Paid
Raghu 12000 7000 5000 41%
Tanvir 0 (Value is Zero in this record) 0 (Value is zero in this record) 0(Value is zero in this record) #Num! (This is the Error)

In excel we have IFERROR function that will help to convert error to 0% but access i am not able to do this.

Can some one please help me.

Thanks,

K Raghavender Rao

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2018-07-05T20:22:10+00:00

You can use this expression - remembering that all expressions inside IIf(..) are always validated:

=IIf([Salary]=0,0,[Salary Incentive]/IIf([Salary]=0,1,[Salary]))

Was this answer helpful?

0 comments No comments

Answer accepted by question author

Anonymous
2018-07-05T19:04:51+00:00

Use IIf.

=IIf([Salary]=0,0,[Salary Incentive]/[Salary])

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Anonymous
    2018-07-06T16:44:45+00:00

    .............remembering that all expressions inside IIf(..) are always validated

    Actually, that's not the case in a query or in a calculated control in a table, one of which I imagine is the case here; in which case the second IIF function call is unnecessary.  Only the TRUE result is evaluated in those contexts.

    Was this answer helpful?

    0 comments No comments
  2. ScottGem 68,830 Reputation points Volunteer Moderator
    2018-07-06T12:18:27+00:00

    If you are having a problem with an expression or piece of code, please post the expression or code you are using

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2018-07-05T17:13:31+00:00

    We can't correct what we cannot see.  What is the expression you've used to compute the percentage?

    Was this answer helpful?

    0 comments No comments