Set mrc = ExecuteSQL(txtSQL, MsgText)
While (mrc.EOF = False)
If Trim(mrc.Fields(0)) = Trim(Text1(0)) Then
MsgBox "用户已经存在,请重新输入用户名!", vbOKOnly + vbExclamation, "警告"
Text1(0).SetFocus
Text1(0).Text = ""
Text1(1).Text = ""
Text1(2).Text = ""
Exit Sub
Else
mrc.MoveNext
End If
Wend
End If
If Trim(Text1(1).Text) <> Trim(Text1(2).Text) Then
MsgBox "两次输入密码不一样,请确认!", vbOKOnly + vbExclamation, "警告"
Text1(1).SetFocus
Text1(1).Text = ""
Text1(2).Text = ""
Exit Sub
Else
If Text1(1).Text = "" Then
MsgBox "密码不能为空!", vbOKOnly + vbExclamation, "警告"
Text1(1).SetFocus
Text1(1).Text = ""
Text1(2).Text = ""
Else
mrc.AddNew
mrc.Fields(0) = Trim(Text1(0).Text)
mrc.Fields(1) = Trim(Text1(1).Text)
mrc.Update
mrc.Close
Me.Hide
MsgBox "添加用户成功!", vbOKOnly + vbExclamation, "添加用户"
End If
End If
End Sub
.........................................................................................................
<< 上一页 [31] [32] [33] [34] [35] [36] [37] [38] [39] [40] ... 下一页 >>