A family of Microsoft relational database management systems designed for ease of use.
I don't see a reason to store it in the table. It is derived information that can be calculated on the fly in a query based on the table.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I have two fields A and B and am in need to build an expression to populate Field C. Basically I need it to populate to field A unless field A is null. If field A is Null then field B should populate instead.
In excel this is what my formula would look like:
=IF(ISBLANK(A1),B1,A1)
Now as I try to build an expression in access I am having no such luck. I have used everything from
IIf(IsNull[A],[B],[A])
to:
IIf((IsNull([A])),(IIF(IsNotNull([A])), [A],[B]),[A])
Is there something that I am missing? I hope this simplifed version of my issue makes sense. I appreciate the help.
A family of Microsoft relational database management systems designed for ease of use.
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.
I don't see a reason to store it in the table. It is derived information that can be calculated on the fly in a query based on the table.
I tried that as well initially but had no such luck. Here is my actual expression with Product Code as Field A and Product Interest (1) as Field B. Fortunately the Nz Expression worked. Thank you for the help.
Adj Prod: IIf((IsNull([Product Code])),(IIF(IsNull([Product Code])), [Product Code],[Product Interest (1)]),[Product Code])
Thank you. A follow up question, however:
Is it safe to store that expression in a field in the table?
Nz should works fine, but instead of IIf(IsNull[A],[B],[A]), you could have tried iif( IsNull**(** [A] ), [B], [A] ). You were missing the ( ) for IsNull.