handling null / error

krishnanhemanth

Registered User.
Local time
Today, 14:23
Joined
Jun 12, 2009
Messages
115
hi everybody

i have a unbound textbox that looksup value from a table ....for example

in a PURCHASE ORDER form i have an unbound textbox called ADVANCE PAYED

THE value for this filed is by using dsum and the value displays correctly
but the problem is....
the table "advancepay" has only data for the purchaseorders where the advance is payed.
purchaseorders that dosent have advancepay is not enterd in this table

suppose...purchase order 1 is eligible for advance pay of 100 $, i enter it in the advancepay table and the corresponding data displays in my form PURCHASE ORDER
purchase order 2 is not eligible for advance pay and hence no entry in the table "advancepay"

but in the form PURCHASE ORDER the unbound textbox ADVANCE PAYED shows a blank for those records that dont have an entry in the table :advancepay"
i would want it to show a zero rather than a blank
i have tried nz, isnull, iserror and failed
plz help
hemanth
 
What's the exact code you're using to populate the Unbound Textbox?

Linq ;0>
 
HI MISSINGLINQ

this is the code iam using on the unbound textbox
=nz(IIf(IsError([PONUMBER]),0,DSum("[VAAMOUNT]","VENDORPAYADVANCE","[PONUMBER]=" & [PONUMBER])))
 
...this is the code iam using on the unbound textbox
=nz(IIf(IsError([PONUMBER]),0,DSum("[VAAMOUNT]","VENDORPAYADVANCE","[PONUMBER]=" & [PONUMBER])))
I'm assuming that this is the code that isn't working; I really meant the code that was originally working before you tried modifying it.

At any rate, if I understand you correctly, I think this should do the trick:
Code:
= Nz(DSum("[VAAMOUNT]", "VENDORPAYADVANCE", "[PONUMBER]=" & [PONUMBER]), 0)
 
great

perfect answer

5 stars for you
*****

thanks again and regards for you missinglinq
 

Users who are viewing this thread

Back
Top Bottom