//在数据窗口的itemchanged事件中添加
long ll_temp1,ll_temp2
if dwo.name = 'b' then
ll_temp1 = this.getitemnumber(row,'a')
ll_temp2 = integer(data)
if ll_temp2 > ll_temp1 then
messagebox('信息提示:','领用的。。。。')
return 1//Reject the data value and don't allow focus to change.
end if
//itemchanged,可以用getcolumn取出b的column,比如=2
long ll_temp1,ll_temp2
dw_data.accepttext()
ll_temp1 = this.getitemnumber(row,'a')
ll_temp2 = this.getitemnumber(row,'b')
if ll_temp2 > ll_temp1 then
messagebox('信息提示:','领用的。。。。')
dw_data.setcolumn(2)
end if