?? 登錄.frm
字號:
VERSION 5.00
Begin VB.Form 登錄
Caption = "人事管理系統登陸"
ClientHeight = 6420
ClientLeft = 60
ClientTop = 450
ClientWidth = 5505
LinkTopic = "Form1"
ScaleHeight = 6420
ScaleWidth = 5505
StartUpPosition = 3 '窗口缺省
Begin VB.Data Data1
Caption = "Data1"
Connect = "Access 2000;"
DatabaseName = ""
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 495
Left = 120
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 3720
Visible = 0 'False
Width = 1860
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 4320
TabIndex = 6
Top = 3960
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "登錄"
Height = 375
Left = 2280
TabIndex = 5
Top = 3960
Width = 975
End
Begin VB.Frame Frame1
Caption = "登錄"
Height = 2775
Left = 720
TabIndex = 0
Top = 360
Width = 5055
Begin VB.TextBox Text2
Height = 375
Left = 2280
TabIndex = 2
Top = 1680
Width = 1575
End
Begin VB.TextBox Text1
Height = 375
Left = 2280
TabIndex = 1
Top = 840
Width = 1575
End
Begin VB.Label Label2
Caption = "請輸入密碼:"
Height = 255
Left = 945
TabIndex = 4
Top = 1680
Width = 1215
End
Begin VB.Label Label1
Caption = "請輸入姓名:"
Height = 255
Left = 945
TabIndex = 3
Top = 960
Width = 1215
End
End
End
Attribute VB_Name = "登錄"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim sql As String
sql = App.Path
If Right(sql, 1) <> "/" Then
sql = sql + "/"
End If
Dim mm As String
mm = Text1.Text
Data1.DatabaseName = sql + "stuff.mdb"
Data1.RecordSource = "Select * from 用戶表 where 用戶名='" & mm & "' "
Data1.Refresh
If Data1.Recordset.EOF Then
Text1.Text = "用戶名不正確!"
Else
If Data1.Recordset.Fields(1) = Text2.Text Then
登錄.Hide
人事管理系統.Show
Else
Text2.Text = "用戶密碼不正確!"
End If
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -