1、
一、用筛选
   sele alianame
   set filter to 英语>60
二、用查询语句
   select * from alianame where 英语>60 into cursor temp1
   thisform.grid1.recordsource='temp1'
2、
   什么东西的源代码,你老师不会要表单的源代码吧,天,晕,

解决方案 »

  1.   

    1.比如查询"英语>60"的学生结果放在游标 ABCselect * from yourtable where 英语>60 into cursor ABC
    thisform.grid1.recordsourcetype=1
    thisform.grid1.recordsource='ABC'
    thisform.refresh2.我不明白
      

  2.   

    其实如果只是简单的要显示满足某些条件的记录,我觉得用set filter to 还要方便些,因为它不需要重设数据源,
    不过用SQL也可以首先把grid1的recordsourcetype设为4,
    然后再在表单的程序语句中写:
    thisform.grid1.recordsource='select * from alianame where 英语>60 into cursor temp1'
      

  3.   

    如果是两个条件呢?
    是这样么?
    select * from alianame where 条件1 and 条件2 into cursor temp1
       thisform.grid1.recordsource='temp1'
      

  4.   

    可以用你所说的方法,
    如果用liuri(璇玑)说的另一种方法set filter to 的话,也是
    set filter to 条件1 and 条件2
    第二个问题:
    有个简单的方法,
    copy file formname.sct to filename.txt
    这样你就可以把该表单的源代码转换到文本文件了。
      

  5.   

    哈,还有问题吗?~
    补充一下,如果想刷新,需要在程序中调用“thisform.grid1.requery”