嗯,在这段加了form2后就是图示了
Private Sub Form_Load()
Me.Left = Screen.Width / 2 - Me.Width / 2
Me.Top = Screen.Height / 2 - Me.Height / 2
Me.Caption = "登陆"
intTryTimes = 0
Set dbLogin = OpenDatabase(App.Path + "\Data.mdb", False, False, "MS Access;pwd=111")
' Set rstLogin = dbLogin.OpenRecordset("select Username from User")
' If rstLogin.RecordCount <> 0 Then
' Me.txtUser = rstLogin.Fields("Username")
' End If
form2.Show
Me.txtUser.SetFocus
End Sub
Private Sub Form_Load()
Me.Left = Screen.Width / 2 - Me.Width / 2
Me.Top = Screen.Height / 2 - Me.Height / 2
Me.Caption = "登陆"
intTryTimes = 0
Set dbLogin = OpenDatabase(App.Path + "\Data.mdb", False, False, "MS Access;pwd=111")
' Set rstLogin = dbLogin.OpenRecordset("select Username from User")
' If rstLogin.RecordCount <> 0 Then
' Me.txtUser = rstLogin.Fields("Username")
' End If
form2.Show
Me.txtUser.SetFocus
End Sub