local cname
cname=alltrim(thisform.Text1.value)
select 课程
if !empty(cname)
locate for
alltrim(课程名)==CNAME
if found()
thisform.grid1.recordsource="select 课程.课程号,课程.课程名,课程.学时,课程.学分;
from 课程 WHERE
alltrim(课程.课程名)==CNAME
into cursor temp"
thisform.grid1.recordsourceTYPE=4
THISFORM.GRID1.COLUMNCOUNT=FCOUNT([temp])
THISFORM.GRID1.REFRESH
else
messagebox("课程记录中没有"+cname+"课程名",16,"提示信息")
thisform.Text1.value=""
thisform.Text1.setfocus
endif
else
messagebox("没有输入课程名,无法查询",16,"提示信息")
thisform.Text1.setfocus
endif
[
本帖最后由 sdta 于 2013-1-18 19:55 编辑 ]