Share via

Blank Field, Null Value

Anonymous
2011-06-23T03:56:31+00:00

Is there a way to use the Nz function as an expression in a calculated field in a table in MS Access 2010?  I can use the Nz function in Forms and Reports under Control Source but receive the message "The expression Nz([AMOUNT 1]) + Nz([AMOUNT 2) cannot be used in a calculated column." when I try to enter it in Expression Builder for a calculated column.

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
2011-06-25T22:01:43+00:00

The Default value will only be applied to newly entered records - not to records already in the table. If zero is an appropriate default value, you could set the Default Value property for future records, and run an update query like

UPDATE mytable

SET [Amount 2] = 0

WHERE [Amount 2] IS NULL;

Back up your database first of course!

Was this answer helpful?

0 comments No comments

10 additional answers

Sort by: Most helpful
  1. Anonymous
    2011-06-24T16:20:41+00:00

    Yes, that was the question.

    Also, if the answer is no, is there another function that can be used instead?

    I'd like the TABLE to retain the consistent information that feeds into the forms and reports.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2011-06-24T01:48:47+00:00

    Is there a way to use the Nz function as an expression in a calculated field in a table in MS Access 2010? 

    Are you trying to use a calculated field in a TABLE?

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2011-06-24T00:21:55+00:00

    Just tried it again.  Same message.  The lack of a close square bracket was a typo in the above question.  I can double-click on the drop-down menu to pick the field, which automatically populates the field with both square brackets.  Also, there is a different message that pops up for missing brackets or parentheses.

    Was this answer helpful?

    0 comments No comments
  4. Tom van Stiphout 40,211 Reputation points MVP Volunteer Moderator
    2011-06-23T04:49:59+00:00

    You forgot a close square bracket:

    Nz([AMOUNT 1]) + Nz([AMOUNT 2])

    Was this answer helpful?

    0 comments No comments