登录部分
Private Sub cmdCancel_Click()
End
End Sub
Private Sub cmdOK_Click()
'检查正确的密码
If combo1.Text = "1" And txtPassword = "1" Or combo1.Text = "" And txtPassword = "" Then
'将代码放在这里传递
'成功到 calling 函数
'设置全局变量时最容易的
LoginSucceeded = True
Me.Hide
Form2.Show
txtPassword = ""
Else
MsgBox "用户名或密码错误,请重试!", , "登录"
combo1.SetFocus
txtPassword = ""
SendKeys "{Home}+{End}"
End If
End Sub
主窗体
Private Sub bz_Click()
Form7.Show
End Sub
Private Sub chaxun_Click()
Form5.Show 1
End Sub
Private Sub close_Click()
End
End Sub
Private Sub Command1_Click(Index As Integer)
If Index = 0 Then
Adodc2.Recordset.MoveFirst
End If
If Index = 1 Then
If Adodc2.Recordset.BOF Then
Adodc2.Recordset.MoveLast
Else
Adodc2.Recordset.MovePrevious
End If