&&表单数据环境为yh表
ym=alltrim(thisform.combo1.value)
mm=alltrim(thisform.text1.value)
locate for alltrim(yh.用户名)==ym .and. alltrim(yh.密码)==mm
if eof()
messagebox("用户名或密码错误,请重新输入",1+48)
else
release thisform
do form1&&调用其它表单
endif
n=n+1
if n=3
messagebox("密码错误超过三次,不能登录!")
release thisform
endif
Local lcID, lcPswd
lcID = NVL(oPubTool.getCID('SYSU'),'ABCD')
liPswd = NVL(oPubTool.getVID('SYSU'),65535)
llOK = Thisform.txtCode.Value==lcID AND Val(Sys(2018,Thisform.txtPwd.Value))==liPswd
IF llOK
oPubTool.OpID = Thisform.txtCode.Value
oPubTool.OpRght = 'A'
oPubTool.OpName = 'System'
EndIF
请上传一下您的相关表单图