求VFP登录界面的“确定”按钮的代码

来源:百度知道 编辑:UC知道 时间:2024/05/23 17:34:31
thisform.i=thisform.i+1
select 登录表
locate for 管理员=alltrim(thisform.combol.value)
if found () And 密码=alltrim(thisform.text1.value)
do 学生档案表单.scx
release thisform
else
if thisform.i<3
=messagebox("管理员密码错!"+Chr(13)+"再试一次!",48,"警告!")
thisform.text1.setfocus
else
= messagebox("对不起,您已经错了三次!"+Chr(13)+"非法用户,请您退出系统!",48,"严重警告!")
thisform.release
endif
endif

运行时提示:找不到属性I
set exact on
select 登录表
locate for thisform.text1.value=管理员 and thisform.text2.value=密码
if !eof()
messagebox ("欢迎使用本系统!",48)
thisform.release
do form 学生档案主表单.scx
else
if thisform .InputNo<2
messagebox("内容有误,请重新输入!",48)
if thisform .InputNo=thisform .InputNo+1
thisform.text1.value=""
thisform.text2.value=""

1、表单没有i属性的。直接用变量好了。
2、最后一行加ENDIF。建议编程是用缩进。例
IF ********
IF **********
************
ELSE
********
ENDIF
**********
ELSE
***********
ENIF

thisform.i??????
哪来的I啊...晕
................
你对你的代码进行如下修改则可....
i=0
thisform.i=thisform.i+1

第二个是缺少一个结束IF语句
在最后加上一句endif就行了