thanks ray, is that the code i need for the show if behavior?
do i still need to add that?
i have a query to show total amount due:
select sum(sub_amt) total_due from ( SELECT sum(AmountGI) sub_amt
FROM generalinsurance
WHERE DatePaidGI is null union select sum(amount)
sub_amt from protection where DatePaid is null
union select sum(amount) sub_amt from buytolet where DatePaid is null
union select sum(amount) sub_amt from mortgage where DatePaid is null
union select sum(Commission) sub_amt from referrals where DatePaidReferral is null
union select sum(Commission) sub_amt from overseas where DatePaidOverseas is null ) a
how can i include the users table to show the user who is due this amount?
thank you ray