ERROR MESSAGE

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello,
I have a report that has over 200 pages. The lookup is the same for each
one,ex: =IIf(NZ(DLookUp("[Amount]","AG Single Acct
Summary","[VPN]=Parent![VPN] And [RSC
Account]='4380.3'"))+NZ(DLookUp("[Amount]","AG Single Acct
Summary","[VPN]=Parent![VPN] And [RSC
Account]='4385.7'"))+NZ(DLookUp("[Amount]","AG Single Acct
Summary","[VPN]=Parent![VPN] And [RSC
Account]='4390.7'"))=0,"",NZ(DLookUp("[Amount]","AG SIngle Acct
Summary","[VPN]=Parent![VPN] And [RSC
Account]='4380.3'"))+NZ(DLookUp("[Amount]","AG Single Acct
Summary","[VPN]=Parent![VPN] And [RSC
Account]='4385.7'"))+NZ(DLookUp("[Amount]","AG Single Acct
Summary","[VPN]=Parent![VPN] And [RSC Account]='4390.7'"))) and it works for
all but a few that do not have any value in those account numbers. I tried
putting in a zero, but it still does not work. Any help would be greatly
appreciated. Thank you. This is driving me crazy.
 
If the records have a null return, you should nest additional IIf statements
testing null, returning 0. this can be tricky: 1. nested vba IIf are kind of
scraggily; 2. You can easily exceed string limitations. If it's easy for you,
then try breaking the query into parts using the query tool. Then mate the
input.
 
Back
Top