Forum Discussion
jazzyelsie
Nov 06, 2024Copper Contributor
MS Access Handling Nulls In Query Formula
Hi all, I have this formula in Access: IIf([Init_Static_P] < 0 And (Nz([Adj_Static_P], -9999) < 0), "Resolved", "Not resolved" which keeps outputting an #Error when Adj_Static_P is null which wil...
Ken_Sheridan
Nov 08, 2024Brass Contributor
What about the following?
>0 <0
<0 >0
As GustavBrock has pointed out, for the four criteria you have cited, the value of Adj_Static_P is immaterial if the ones you cite are are the only ones permissible.
Also what if either/both = 0?
If the possible values are constrained I’d suggest you enforce this by means of a table level Validation Rule, or by applying a CHECK CONSTRAINT to the table, preferably the former as the latter is not portable.