Share via

Formula not working, help please!

Anonymous
2015-10-15T17:37:42+00:00

IIf([All Points]>2500,[All Points]/[Current Points],"False")

This is giving me an error "The expression could not be saved because it's result type, such as binary or NULL, is not supported by the server" What does this mean?

Basically I want it to look at column AllPoints and if it's over 2500 then I want it to divide it by the CurrentPoints column else return False

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

9 answers

Sort by: Most helpful
  1. Anonymous
    2015-10-15T18:13:59+00:00

    Is this a calculated field in a table?  Don't do it that way!

    Create a query based on your table and use your original expression as a calculated column in the query.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2015-10-15T18:04:53+00:00

    I'm trying to use the Expression Builder to do it directly into the column.

    When I use either of those it just returns 0 no matter what.

    I've got the column set up as a calculated number column if that helps.

    Was this answer helpful?

    0 comments No comments
  3. DBG 11,711 Reputation points Volunteer Moderator
    2015-10-15T17:48:36+00:00

    False usually means 0. Do you still get an error if you try it this way?

    IIf([All Points]>2500,[All Points]/[Current Points], 0)

    If so, then perhaps is a "divide by zero" situation. Then try the following:

    IIf([All Points]>2500, IIf([Current Points]=0,0,[All Points]/[Current Points]),0)

    or this way:

    IIf([Current Points]=0,0,IIf([All Points]>2500,[All Points]/[Current Points],0))

    Are you using this in a query or VBA?

    Hope that helps...

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2015-10-15T17:48:00+00:00

    It's in a table in a database, I just want it to either display the returned number or False in the column.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2015-10-15T17:46:02+00:00

    The problem is with the datatypes. Your calculation will return a Double Float number value; the text string "False" is not a valid Double Float number!

    What will you be doing with the result of this expression? Just displaying it, or doing further operations? What's the context - where do you have this expression?

    Was this answer helpful?

    0 comments No comments