hcl-bot
October 27, 2003, 11:23am
1
Hi,
I have this dblookup, it works well, but I am having trouble putting together an error message that return blank if the Consultant field is blank or dblookup cannot find a result. Can some assist. Thanks,
Adam
@DbLookup (“”:“”;“”:“Tax Consultant dBase.nsf”;“Consultant Lookup”;Consultant;“TCContact”)
hcl-bot
October 27, 2003, 11:31am
2
Subject: @dblookup error check/message
I don’t know where your using your DBLookup but you can use something like this :
TheValue:=@DbLookup (“”:“”;“”:“Tax Consultant dBase.nsf”;“Consultant Lookup”;Consultant;“TCContact”);
@If (@IsError (TheValue);“My Error Value”;TheValue)
You should always use something like this to avoid runtime errors.
Renaud
Subject: You can also check before doing the lookup
Temp := @if (Consultant = “”;“”;@DBLookup (…));@if (@isError (Temp) | temp = “”;
@prompt ([OK];“No Consultant”;“Foolish Human. Please enter the Consultant.”);“”);
.
.
.
Continue
Subject: RE: You can also check before doing the lookup
Thank you both for the help. I tried both and I have had success.
Thanks! Adam