Hi,
I am hoping someone can steer me in the right direction. I have worked with the Notes Help and this forum trying to find a resolution. I have found none that I can get to work for me.
I have a number format field with the following formula attached to it:
@If(@Count(@If(@DbLookup( “” : “NoCache” ; “” : “” ; “LineItemCounter” ; MainID ; “MainID” ) !=“”;@Success;@Failure(“0”))))
This works fine as long as there is a value to count, if there is not, I receive an error message in the field. My goal is to have “0” displayed in that circumstance.
Any help will be greatly appreciated 
Subject: Test if @DbLookup returns an error
test:=@DbLookup(…);@if(@IsError(test);0;@count(test))
Note: use @Success and @Failure() only in validation formulas.
Subject: RE: Test if @DbLookup returns an error
Worked like a charm:) Thank you SO much!!
Subject: @Count error message when encountering 0
num:=(@DbLookup( “” : “NoCache” ; “” : “” ; “LineItemCounter” ; MainID ; “MainID”;[FAILSILENT] );
@if(num!=“”;@success;@Failure(“0”)
Subject: RE: @Count error message when encountering 0
I like this 
I merged the 2 suggestions to a working formula:
test:=@DbLookup( “” : “NoCache” ; “” : “” ; “LineItemCounter” ; MainID ; “MainID”;[FailSilent] );
@If(test !=“”;@Success;@Failure(“0”))
Thanks again!