以下是引用lifeng123在2014-4-3 08:36:37的发言:
自己写了一个根据身份证号判断在校的学生是否有照片,将没有照片的学生信息打印出来。我想问的是如果每一个学生都有照片,在哪个位置加一个messagebox("每个学生都有照片!")
use HFFile EXCLUSIVE
delete all
pack
Select HFFile
thisform.refresh
If Adir(sfzh,"\新生报名系统\picture\*.jpg")>0
Select HFFile
MESSAGEBOX("查询没有照片的学生信息?",4+32+256,"系统信息")
Append From Array sfzh
ELSE
MESSAGEBOX("该文件是空的!",64,"系统信息")
Endif
select * from stu Where not exists(select * from hffile WHERE hffile.sfzh=stu.sfzh) into table zdz
*===================================================================================
IF _Tally = 0
MESSAGEBOX(""每个学生都有照片!")
RETURN
ENDIF
*===================================================================================
sele sfzh,xm,xb,bj,bysj,lxr,bz from zdz order by bj asc,bz asc into table zz
thisform.grid1.RecordSource="zz"
thisform.grid1.column1.Width=162
thisform.grid1.column2.Width=75
thisform.grid1.column3.Width=75
thisform.grid1.column4.Width=242
thisform.grid1.column5.Width=75
thisform.grid1.column6.Width=75
thisform.grid1.column1.header1.Caption='身份证'
thisform.grid1.column2.header1.Caption='姓名'
thisform.grid1.column3.header1.Caption='性别'
thisform.grid1.column4.header1.Caption='班级'
thisform.grid1.column5.header1.Caption='联系人'
thisform.grid1.column6.header1.Caption='备注'
thisform.grid1.refresh()
请看上图中的红色字体部分。