?? form1.frm
字號(hào):
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "MSADODC.OCX"
Begin VB.Form Form1
Caption = " "
ClientHeight = 3120
ClientLeft = 60
ClientTop = 420
ClientWidth = 4680
LinkTopic = "Form1"
ScaleHeight = 3120
ScaleWidth = 4680
StartUpPosition = 3 '窗口缺省
Begin VB.ComboBox Combo1
Height = 300
Left = 3240
TabIndex = 6
Text = "系統(tǒng)用戶"
Top = 240
Width = 1095
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 2760
TabIndex = 3
Top = 1440
Width = 1335
End
Begin VB.CommandButton Command1
Caption = "確定"
Height = 495
Left = 720
TabIndex = 2
Top = 1440
Width = 1335
End
Begin VB.TextBox Text2
Height = 375
IMEMode = 3 'DISABLE
Left = 1440
PasswordChar = "*"
TabIndex = 1
Top = 720
Width = 1695
End
Begin VB.TextBox Text1
Height = 375
Left = 1440
TabIndex = 0
Top = 240
Width = 1695
End
Begin MSAdodcLib.Adodc Adodc1
Height = 735
Left = 120
Top = 2160
Width = 2895
_ExtentX = 5106
_ExtentY = 1296
ConnectMode = 0
CursorLocation = 3
IsolationLevel = -1
ConnectionTimeout= 15
CommandTimeout = 30
CursorType = 3
LockType = 3
CommandType = 8
CursorOptions = 0
CacheSize = 50
MaxRecords = 0
BOFAction = 0
EOFAction = 0
ConnectStringType= 1
Appearance = 1
BackColor = -2147483643
ForeColor = -2147483640
Orientation = 0
Enabled = -1
Connect = ""
OLEDBString = ""
OLEDBFile = ""
DataSourceName = ""
OtherAttributes = ""
UserName = ""
Password = ""
RecordSource = ""
Caption = "Adodc1"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "宋體"
Size = 9
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
_Version = 393216
End
Begin VB.Label Label2
Caption = "密碼"
Height = 375
Left = 120
TabIndex = 5
Top = 840
Width = 1215
End
Begin VB.Label Label1
Caption = "用戶名"
Height = 375
Left = 120
TabIndex = 4
Top = 240
Width = 1215
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim ss As String
Dim kk As String
Dim ff As New ADODB.Connection
Dim rs As New ADODB.Recordset
Private Sub Combo1_Click()
kk = Combo1.Text
End Sub
Private Sub Command1_Click()
Dim sq As String
If kk = "系統(tǒng)用戶" Then
sq = "select * from 系統(tǒng)用戶"
Else
sq = "select * from 普通用戶"
End If
rs.Open (sq)
rs.MoveNext
Do Until rs.EOF()
If rs.Fields(0) = Text1.Text And rs.Fields(1) = Text2.Text Then
MsgBox "歡迎進(jìn)入系統(tǒng)"
Form5.Show
Exit Sub
Else
MsgBox "對(duì)不起,你輸入的密碼或用戶名錯(cuò)誤"
rs.Close
Exit Sub
End If
rs.MoveNext
Loop
End Sub
Private Sub Command2_Click()
rs.Close
End
End Sub
Private Sub Form_Load()
Combo1.AddItem "系統(tǒng)用戶"
Combo1.AddItem "普通用戶"
kk = "系統(tǒng)用戶"
Set ff = New ADODB.Connection
rs.CursorType = adOpenDynamic
ff.Provider = "microsoft.jet.oledb.4.0"
ff.ConnectionString = "data source=E:\15\學(xué)生成績(jī)檔案.mdb"
ff.Open
Set rs.ActiveConnection = ff
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -