# Thread: Access 2003 - calculation help

1. I have a calculation:

CountY: Abs(((NZ([Rcac hlh in],"")="Y") Or (NZ([Rcac Hlh Sr in],"")="Y"))+(NZ([Rcac Hlh Den in],"")="Y")+(NZ([Rcac Hlh Vis in],"")="Y")+(NZ([Rcac Davis in],"")="Y")+(NZ([Rcac UCCI in],"")="Y")+(NZ([Rcac HMIG in],"")="Y")+(NZ([Rcac MtSt Den in],"")="Y")+(NZ([Rcac MtSt Vis in],"")="Y")+((NZ([Rcac MtSt HlH In],"")="Y") Or (NZ([Rcac MtSt Sr In],"")="Y")))

that I have to revise but my revision is giving me negative numbers. I need to add the last two indicators [Rcac MtSt HlH in] and the [Rcac mtSt Sr In] so that now it appears as [Rcac hlh in] or [Rcac Hlh Sr in] or [Rcac MtSt Hlh In] or [Rcac MtSt Sr In]are counted as one. I tried to add two more OR statements to the beginning but I must be messing up the parenthesis.

Your help would be greatly appreciated.

2. Does this do what you want?

CountY: Abs(((NZ([Rcac hlh in],"")="Y") Or (NZ([Rcac Hlh Sr in],"")="Y") Or (NZ([Rcac MtSt HlH In],"")="Y") Or (NZ([Rcac MtSt Sr In],"")="Y"))+(NZ([Rcac Hlh Den in],"")="Y")+(NZ([Rcac Hlh Vis in],"")="Y")+(NZ([Rcac Davis in],"")="Y")+(NZ([Rcac UCCI in],"")="Y")+(NZ([Rcac HMIG in],"")="Y")+(NZ([Rcac MtSt Den in],"")="Y")+(NZ([Rcac MtSt Vis in],"")="Y"))

3. [quote name='HansV' post='797959' date='14-Oct-2009 18:59']Does this do what you want?

CountY: Abs(((NZ([Rcac hlh in],"")="Y") Or (NZ([Rcac Hlh Sr in],"")="Y") Or (NZ([Rcac MtSt HlH In],"")="Y") Or (NZ([Rcac MtSt Sr In],"")="Y"))+(NZ([Rcac Hlh Den in],"")="Y")+(NZ([Rcac Hlh Vis in],"")="Y")+(NZ([Rcac Davis in],"")="Y")+(NZ([Rcac UCCI in],"")="Y")+(NZ([Rcac HMIG in],"")="Y")+(NZ([Rcac MtSt Den in],"")="Y")+(NZ([Rcac MtSt Vis in],"")="Y"))[/quote]

Thanks Hans - works perfectly...

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•