SET DELETED ON
SET TALK OFF
IF EMPTY(thisform.text2.Value)
=MESSAGEBOX('请输入学生姓名',64,'提示')
thisform.text1.SetFocus
RETURN
ENDIF
SELE 毕业生
*SELECT * FROM 毕业生 WHERE 学生姓名==ALLTRIM(thisform.text2.Value)
LOCA FOR ALLT(学生姓名)==ALLT(THISFORM.TEXT2.VALUE)
IF FOUND()
THISFORM.GRID1.SETFOCUS
ELSE
MESSAGEBOX('查无此毕业生,请检查姓名输入是否正确?')
ENDIF
THISFORM.REFRESH
LOCAL query_tmp1
query_tmp1=thisform.grid1.RecordSource
ZAP IN (query_tmp1)
INSERT INTO (query_tmp1) SELECT * FROM 毕业生 WHERE 学生姓名==ALLTRIM(thisform.text2.Value)
GO TOP IN (query_tmp1)
*thisform.grid1.AutoFit
thisform.image1.Picture= "g\"+学籍号码+".jpg"
thisform.Refresh