📄 添加用户.frm
字号:
VERSION 5.00
Object = "{67397AA1-7FB1-11D0-B148-00A0C922E820}#6.0#0"; "msadodc.ocx"
Begin VB.Form Form13
BorderStyle = 1 'Fixed Single
Caption = "Form13"
ClientHeight = 3975
ClientLeft = 4350
ClientTop = 3045
ClientWidth = 4725
LinkTopic = "Form13"
MaxButton = 0 'False
MDIChild = -1 'True
MinButton = 0 'False
ScaleHeight = 3975
ScaleWidth = 4725
Begin MSAdodcLib.Adodc Adodc1
Height = 855
Left = 3840
Top = 3120
Visible = 0 'False
Width = 1575
_ExtentX = 2778
_ExtentY = 1508
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.CommandButton Command2
Caption = "取消添加"
Height = 495
Left = 2400
TabIndex = 5
Top = 3360
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "确定添加"
Height = 495
Left = 600
TabIndex = 4
Top = 3360
Width = 1455
End
Begin VB.TextBox Text2
Height = 495
Left = 1560
TabIndex = 3
Top = 1005
Width = 2535
End
Begin VB.TextBox Text1
Height = 495
Left = 1560
TabIndex = 2
Top = 240
Width = 2535
End
Begin VB.TextBox Text4
Height = 495
Left = 1560
TabIndex = 1
Top = 1800
Width = 2535
End
Begin VB.ComboBox Combo1
BeginProperty Font
Name = "宋体"
Size = 14.25
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 405
Left = 1560
Style = 2 'Dropdown List
TabIndex = 0
Top = 2520
Width = 2535
End
Begin VB.Label Label3
Caption = "类 型:"
Height = 495
Left = 480
TabIndex = 9
Top = 2640
Width = 1455
End
Begin VB.Label Label2
Caption = "密 码:"
Height = 495
Left = 480
TabIndex = 8
Top = 1200
Width = 1455
End
Begin VB.Label Label1
Caption = "添加用户:"
Height = 495
Left = 480
TabIndex = 7
Top = 360
Width = 1455
End
Begin VB.Label Label4
Caption = "确认密码:"
Height = 495
Left = 480
TabIndex = 6
Top = 1920
Width = 1455
End
End
Attribute VB_Name = "Form13"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Or Text4.Text = "" Then
MsgBox "请填写完整!!!"
Else
If Text2.Text = Text4.Text Then
Adodc1.Recordset.AddNew
Adodc1.Recordset(1) = Text1.Text
Adodc1.Recordset(2) = Text2.Text
Adodc1.Recordset(3) = Combo1.Text
Adodc1.Recordset.Update
Adodc1.Refresh
MsgBox "您添加成功了!!!"
Else
MsgBox "密码不一致,请重新填写!!!"
End If
End If
End Sub
Private Sub Form_Load()
Me.Caption = "注册用户"
If yonghu = "user" Then
Combo1.AddItem "0"
Combo1.AddItem "1"
Else
Combo1.AddItem "1"
End If
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\student1.mdb;Persist Security Info=False"
Adodc1.RecordSource = "admin"
Adodc1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -