表格重叠问题..
为什么点两次按钮时,表格老是会重叠?请问有什么办法可以解决?是不是临时表的问题?
SELECT * From scrap where Between(date,Dtot(Thisform.text1.Value),Dtot(Thisform.text2.Value)) ;
AND Alltrim(line)=Alltrim(Thisform.text3.Value) AND Alltrim(name)=Alltrim(Thisform.text4.Value) ;
Into CURSOR temp
thisform.grid1.RecordSource="temp"
thisform.grid1.SetFocus
thisform.Refresh
代码就是这样..
是临时表的问题,因为您的Select 语句生成了一个临时表并形成一个浏览窗口覆盖在了你的表单上了。
看看这样行不:
thisform.grid1.RecordSource="SELECT * From scrap where"+Between(date,Dtot(Thisform.text1.Value),Dtot(Thisform.text2.Value)) ;
+"AND"+ Alltrim(line)=Alltrim(Thisform.text3.Value) +"AND"+ Alltrim(name)=Alltrim(Thisform.text4.Value) ;
+"Into CURSOR temp"
thisform.grid1.SetFocus
thisform.Refresh
对于Grid,我习惯用Set filter to
[此贴子已经被作者于2006-8-15 16:40:00编辑过]