Share via

When sorting get error message Division by zero

Anonymous
2011-08-25T13:13:36+00:00

I have made a query to make new column in my Access database with the following fomula: FSC: Round([ex am1]/[on bill],3)

An example of the ending result of one is (EX AM1=00021500)   /  (on bill=464400)  The Result in this new column is FSC= 0.046.

I want to sort the new FSC Column from Z-A Decending and it gives me the Error message: Division by zero---Is their a way to fix something so I can sort this column?

Thanks

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

HansV 462.6K Reputation points
2011-08-25T18:38:29+00:00

You might try uploading a zip file containing the database.

I thought that the expression I posted in my first reply would have taken care of 0 values. Does the following work better?

FSC: IIf(Nz([on bill],0)=0, 0, Round([ex am1]/[on bill],3))

Was this answer helpful?

0 comments No comments

7 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-08-25T19:34:43+00:00

    Yes it did! Thanks!

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-08-25T17:04:57+00:00

    It seems you can not upload Access files. I may have found what is causing the error.

    If 0 is named in the "on bill" field then it will show "#Div/0!" in the new FSC column. If I eliminate theses istances from showing like named it will sort fine.

    Does this make sense?

    Was this answer helpful?

    0 comments No comments
  3. HansV 462.6K Reputation points
    2011-08-25T16:18:36+00:00

    Go to https://skydrive.live.com/

    Log in with your Windows Live account (if you're not already logged in)

    You may have to set up some things.

    After that, open your Shared folder, then click Add Files.

    Was this answer helpful?

    0 comments No comments