?? frm_tjczy.frm
字號:
VERSION 5.00
Begin VB.Form FRM_TJCZY
Caption = "添加操作員"
ClientHeight = 3735
ClientLeft = 5505
ClientTop = 2775
ClientWidth = 6870
Icon = "FRM_TJCZY.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
ScaleHeight = 3735
ScaleWidth = 6870
Begin VB.Data data_czy
Caption = "Data_czy"
Connect = "Access 2000;"
DatabaseName = ""
DefaultCursorType= 0 '缺省游標
DefaultType = 2 '使用 ODBC
Exclusive = 0 'False
Height = 285
Left = 1560
Options = 0
ReadOnly = 0 'False
RecordsetType = 1 'Dynaset
RecordSource = ""
Top = 3000
Width = 2175
End
Begin VB.TextBox TXT_CFMM
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 8
Top = 1800
Width = 2295
End
Begin VB.CommandButton CMD_TJ
Caption = "添加"
Default = -1 'True
Enabled = 0 'False
Height = 375
Left = 600
TabIndex = 5
Top = 2400
Width = 1335
End
Begin VB.CommandButton CMD_FH
Caption = "返回主窗體"
Height = 375
Left = 2520
TabIndex = 6
Top = 2400
Width = 1455
End
Begin VB.TextBox TXT_MM
Height = 270
IMEMode = 3 'DISABLE
Left = 1680
PasswordChar = "*"
TabIndex = 4
Top = 1320
Width = 2295
End
Begin VB.TextBox TXT_CZY
Height = 270
Left = 1680
MaxLength = 8
TabIndex = 3
Top = 840
Width = 2295
End
Begin VB.Label Label4
Caption = "重復密碼:"
Height = 255
Left = 600
TabIndex = 7
Top = 1800
Width = 975
End
Begin VB.Label Label3
Caption = "密 碼:"
Height = 255
Left = 600
TabIndex = 2
Top = 1320
Width = 975
End
Begin VB.Label Label2
Caption = "操 作 員:"
Height = 255
Left = 600
TabIndex = 1
Top = 840
Width = 975
End
Begin VB.Label Label1
Caption = "添加操作員"
BeginProperty Font
Name = "宋體"
Size = 15.75
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 1560
TabIndex = 0
Top = 120
Width = 1575
End
End
Attribute VB_Name = "FRM_TJCZY"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub CMD_TJ_Click()
If Trim(TXT_CZY.Text) = "" Then
'檢驗:姓名必填
MsgBox "請輸入操作員名字!", vbOKOnly + vbInformation, "添加操作員"
Exit Sub
ElseIf TXT_MM.Text <> TXT_CFMM.Text Then
'檢驗:密碼必須一致
MsgBox "兩次輸入的密碼不一致,請核實!"
Else
'連接并打開數據庫
'添加記錄
data_czy.Recordset.Fields("操作員") = TXT_CZY.Text
data_czy.Recordset.Fields("密碼") = TXT_MM.Text
data_czy.Recordset.Update
CMD_TJ.Enabled = False
MsgBox "添加成功。", vbOKOnly + vbInformation, "添加操作員"
TXT_CZY.Text = ""
TXT_MM.Text = ""
TXT_CFMM.Text = ""
End If
End Sub
Private Sub CMD_FH_Click()
Unload Me
End Sub
Private Sub Form_Load()
data_czy.DatabaseName = "student.MDB"
data_czy.RecordSource = "MIMA"
data_czy.Refresh
data_czy.Recordset.AddNew
End Sub
Private Sub Form_Unload(Cancel As Integer)
MAIN.Show
End Sub
Private Sub TXT_CZY_Change()
CMD_TJ.Enabled = True
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -