主要用VB+SQL设计的 后台工作少些 主要针对前台的工作的
End If
miCount = miCount + 1 If miCount = 3 Then Me.Hide End If Exit Sub End Sub
Private Sub Form_Load() OK = False miCount = 0 End Sub
Private Sub From_() End Sub
2、 系统
添加用户代码
Private Sub cmdCancel_Click() Unload Me End Sub
Private Sub cmdOK_Click() Dim txtSQL As String
Dim mrc As ADODB.Recordset Dim MsgText As String
If Trim(txtUserName.Text) = "" Then
MsgBox "请输入用户名称!", vbOKOnly + vbExclamation, "警告" Exit Sub
txtUserName.SetFocus Else
txtSQL = "select * from user_Info" Set mrc = ExecuteSQL(txtSQL, MsgText) While (mrc.EOF = False)
If Trim(mrc.Fields(0)) = Trim(txtUserName.Text) Then
MsgBox "用户已经存在,请重新输入用户名!", vbOKOnly + vbExclamation, "警告" txtUserName.SetFocus txtUserName.Text = "" txtPassword1.Text = "" txtPassword2.Text = "" Exit Sub Else
mrc.MoveNext End If Wend