下班放松去。。。。。。
回复 30楼 bccn0906
c_name=Alltrim(Thisform.text1.Value) c_password=Alltrim(Thisform.text2.Value) c_messageTitle='登陆系统' &&指定对话框标题栏中的文本 nDialogType=4+32 &&定义对话框内容 set order to 编号 seek c_name If Alltrim(User.用户名)=='' &&用户名为空 c_messageText='请输入用户名' nAnswer=Messagebox(c_messageText,nDialogType,c_messageTitle) Do Case Case nAnswer=6 Thisform.text1.Value='' Thisform.text1.SetFocus Case nAnswer=7 thisform.Release Endcase If Alltrim(User.用户名)==c_name &&用户名正确 If Alltrim(User.密码)=='' c_messageText='请重新输入密码' nAnswer=Messagebox(c_messageText,nDialogType,c_messageTitle) Do Case Case nAnswer=6 Thisform.text2.Value='' Thisform.text2.SetFocus Case nAnswer=7 thisform.Release Endcase If Alltrim(User.密码)==c_password &&密码正确 Thisform.Visible=.F. Do Form Index Else c_messageText='密码错误,请重新输入' nAnswer=Messagebox(c_messageText,nDialogType,c_messageTitle) Do Case Case nAnswer=6 Thisform.text2.Value='' Thisform.text2.SetFocus Case nAnswer=7 thisform.Release Endcase Endif Endif Else c_messageText='用户名错误,请重新输入' nAnswer=Messagebox(c_messageText,nDialogType,c_messageTitle) Do Case Case nAnswer=6 Thisform.text1.Value='' Thisform.text1.SetFocus Case nAnswer=7 thisform.Release Endcase Endif Thisform.Release Endif