Hi,
I am have trouble getting with the following code. It is working correctly expect when I have two invalid IDs. Only the second invalid IDs color appears to be changed. Any help in correcting this would be appreciated.
Thanks,
Ravi
lb_vaild = true
for ll_ctr = 1 to tab_page.tabpage_batch_receipts.dw_8.RowCount()
IF tab_page.tabpage_batch_receipts.dw_8.GetItemNumber(ll_ctr, 'id') > 0 and tab_page.tabpage_batch_receipts.dw_8.GetItemString(ll_ctr, 'source') > ' ' THEN
If IsNull(tab_page.tabpage_batch_receipts.dw_8.GetItemNumber(ll_ctr, 'amount')) Then
tab_page.tabpage_batch_receipts.dw_8.SetItem(ll_ctr, 'amount', 0)
End If
ldec_calc_amt = ldec_calc_amt + tab_page.tabpage_batch_receipts.dw_8.GetItemDecimal(ll_ctr, "amount")
ll_calc_units++
ll_id = tab_page.tabpage_batch_receipts.dw_8.GetItemNumber(ll_ctr, 'id')
select count(*) into :ll_id_cnt
from main
where id = :ll_id;
If ll_id_cnt = 0 Then
tab_page.tabpage_batch_receipts.dw_8.Modify("id.Background.Color='0~tIf("+string(ll_ctr) +" = GetRow() , rgb(255,255,0), rgb(255,255,255))'")
lb_vaild = false
End If
next
if lb_vaild = false then
messagebox('return', '0')
return 0
else
return 1
messagebox('return', '1')
end if
I am have trouble getting with the following code. It is working correctly expect when I have two invalid IDs. Only the second invalid IDs color appears to be changed. Any help in correcting this would be appreciated.
Thanks,
Ravi
lb_vaild = true
for ll_ctr = 1 to tab_page.tabpage_batch_receipts.dw_8.RowCount()
IF tab_page.tabpage_batch_receipts.dw_8.GetItemNumber(ll_ctr, 'id') > 0 and tab_page.tabpage_batch_receipts.dw_8.GetItemString(ll_ctr, 'source') > ' ' THEN
If IsNull(tab_page.tabpage_batch_receipts.dw_8.GetItemNumber(ll_ctr, 'amount')) Then
tab_page.tabpage_batch_receipts.dw_8.SetItem(ll_ctr, 'amount', 0)
End If
ldec_calc_amt = ldec_calc_amt + tab_page.tabpage_batch_receipts.dw_8.GetItemDecimal(ll_ctr, "amount")
ll_calc_units++
ll_id = tab_page.tabpage_batch_receipts.dw_8.GetItemNumber(ll_ctr, 'id')
select count(*) into :ll_id_cnt
from main
where id = :ll_id;
If ll_id_cnt = 0 Then
tab_page.tabpage_batch_receipts.dw_8.Modify("id.Background.Color='0~tIf("+string(ll_ctr) +" = GetRow() , rgb(255,255,0), rgb(255,255,255))'")
lb_vaild = false
End If
next
if lb_vaild = false then
messagebox('return', '0')
return 0
else
return 1
messagebox('return', '1')
end if