if rdball.checked=true then accept := (table1['class']='支出') or (table1['class']='收入');
if rdbOut.checked=true then accept := table1['class']='支出';
if rdbIn.checked=true then accept := table1['class']='收入';
因为radiabutton是多选一的,所以没必要那样写
if rdbOut.checked=true then accept := table1['class']='支出';
if rdbIn.checked=true then accept := table1['class']='收入';
因为radiabutton是多选一的,所以没必要那样写
解决方案 »
- cxDateEdit
- 如何删除(清空)scrollbox里所有的控件
- 谁有能访问FIREBIRD 1.5的免费 DBEXPRESS FOR FIREBIRD 1.5 重谢啊
- 为什么要用creat()?
- delphi+sqlserver(在线)
- 急急急急~~高手们救救我~我的系统是用Delphi7编写的,数据库用的是SQL Server,连接数据用的是ADO!
- 100请教大家,adotable连接sql,在sql数据库中设默认值,adotable添加并提交数据后,再进行操作出错误。
- 急需DELHPI编程熟手,找工作的请进!!!
- 特大喜讯.杭州的Delphi爱好者值得一看.请意向者速速速联系.
- 求滚动抽奖程序
- 在Delphi6中如何实现格式化磁盘?
- Shell编程---如何判断一目录是否共享?
if rdball.checked then
begin
if table1.filtered then table1.filtered:=false;
accept := (table1['class']='支出') or (table1['class']='收入')
table1.filtered:=true;
end;
table1.Filtered:=False;
table1.Filtered:=True;
table1.filtered:=false;
table1.filtered:=true;
才对.因为你不运行第一句,Table不会重新过虑的.
在able1FilterRecord中
accept := (table1['date']=date)
当月:
year,month,day:word;
date1,date2:TdateTime;
DecodeDate(date,year,month,day)
Date1:=EncodeDate(year,month,1);
date2:=EncodeDate(year,month,31);//当月的日数为30,28,29,31的就写
//30,28,29,31,这要自己判断
accept := (table1['date']>=date1 and table1['date']<=Date2)
当年:
year,month,day:word;
date1,date2:TdateTime;
DecodeDate(date,year,month,day)
Date1:=EncodeDate(year,01,1);
date2:=EncodeDate(year,12,31);//月的日数为31
accept := (table1['date']>=date1 and table1['date']<=Date2)