2,749
社区成员
发帖
与我相关
我的任务
分享表单数据环境中有一个表,表名"口令",有操作员和口令两个字段.
表单有一个自定义属性dlcs,初始值为0
表单上两个文本框和两个按钮,下面是确定按钮的程序
if empty(alltrim(thisform.text1.value))
messagebox("操作员不可为空!",54)
thisform.dlcs=thisform.dlcs+1
thisform.text1.setfocus
return
endif
select 口令
locate for 操作员=alltrim(thisform.text1.value) and 口令=alltrim(thisform.text2.value)
if !eof()
thisform.release
do form 主表单.scx
else
if thisform.dlcs<2
messagebox("你输入了错误的操作员名或密码,请重新输入!",54)
thisform.dlcs=thisform.dlcs+1
thisform.text1.value=""
thisform.text2.value=""
thisform.text1.setfocus
else
messagebox("你不是本系统的合法用户,再见!",54)
thisform.release
clear events
endif
endif