Hi I am very new to access.. and I using the code below which returns only one result
TXTUTR=Dlookup("utr_number", "ecs", " payment_sl_no=forms! Formamount! COMPMT and forms! Formamount! COMFY)
Can you explain your criteria.
At the moment you appear to want a record where "payment_sl_no" equals both "COMPMT" AND "COMFY". That will only happen if they are both the same. Perhaps you meant OR.
Also, what is the Data Type of the field called "payment_sl_no".
Thanks all of you
Yes the result should be one record only.
But when payment_sl_no gets changed the value does not change.
It is a numeric field and controlled thorough a combo box and COMFY is the financial year again a numeric field through combo