📄 addmange.frm
字号:
VERSION 5.00
Begin VB.Form addmange
Caption = "添加管理员"
ClientHeight = 2160
ClientLeft = 7965
ClientTop = 5205
ClientWidth = 3855
LinkTopic = "Form2"
ScaleHeight = 2160
ScaleWidth = 3855
Begin VB.Frame Frame1
Appearance = 0 'Flat
BackColor = &H00C0C0C0&
ForeColor = &H00E0E0E0&
Height = 2145
Left = 0
TabIndex = 0
Top = 0
Width = 3855
Begin VB.CommandButton Command1
Caption = "添加"
Height = 435
Left = 1365
TabIndex = 5
Top = 1680
Width = 1275
End
Begin VB.TextBox Text2
Height = 330
IMEMode = 3 'DISABLE
Left = 1365
PasswordChar = "*"
TabIndex = 4
Text = "Text2"
Top = 1050
Width = 2115
End
Begin VB.TextBox Text1
Height = 330
Left = 1365
TabIndex = 3
Text = "Text1"
Top = 420
Width = 2115
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "用户名"
Height = 180
Left = 300
TabIndex = 2
Top = 450
Width = 540
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "密 码"
Height = 180
Left = 300
TabIndex = 1
Top = 1140
Width = 540
End
End
End
Attribute VB_Name = "addmange"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If MsgBox("确实要添加吗?", vbYesNo + vbQuestion, "提示") = vbYes Then
Call upD1
rst.Update
MsgBox "添加成功"
End If
Unload Me
Exit Sub
End Sub
Private Sub Form_Load()
Text1.Text = ""
Text2.Text = ""
On Error GoTo fmerr
If QueryData("select * from yh") = True Then
Else
MsgBox "查询失败!"
End If
Exit Sub
fmerr:
If rst.BOF = True And rst.EOF = True Then
MsgBox "没有任何记录!"
End If
End Sub
Private Sub upD1()
rst.AddNew
rst.Fields(0).Value = Text1.Text
rst.Fields(1).Value = Text2.Text
rst.Update
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -