📄 modification.frm
字号:
VERSION 5.00
Begin VB.Form modification
Caption = "修改系统用户信息"
ClientHeight = 4110
ClientLeft = 60
ClientTop = 450
ClientWidth = 8100
LinkTopic = "Form1"
ScaleHeight = 4110
ScaleWidth = 8100
StartUpPosition = 3 '窗口缺省
Begin VB.ComboBox Combo1
Height = 300
ItemData = "modification.frx":0000
Left = 2040
List = "modification.frx":000A
Style = 2 'Dropdown List
TabIndex = 12
Top = 3240
Width = 1935
End
Begin VB.TextBox Text1
Height = 270
Index = 3
Left = 2040
TabIndex = 11
Top = 2760
Width = 2415
End
Begin VB.TextBox Text1
Height = 270
Index = 2
Left = 2040
TabIndex = 10
Top = 2280
Width = 2415
End
Begin VB.TextBox Text1
Height = 270
Index = 1
Left = 2040
TabIndex = 9
Top = 1800
Width = 2415
End
Begin VB.CommandButton Command2
Caption = "取消"
Height = 495
Left = 5280
TabIndex = 8
Top = 2640
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 495
Left = 5280
TabIndex = 7
Top = 1560
Width = 1095
End
Begin VB.TextBox Text1
Height = 270
Index = 0
Left = 2040
TabIndex = 6
Top = 1320
Width = 2415
End
Begin VB.Label Label7
Caption = "改后权限:"
Height = 255
Left = 720
TabIndex = 5
Top = 3240
Width = 1575
End
Begin VB.Label Label6
Caption = "改后密码:"
Height = 255
Left = 720
TabIndex = 4
Top = 2760
Width = 1215
End
Begin VB.Label Label5
Caption = "改后用户名:"
Height = 255
Left = 600
TabIndex = 3
Top = 2280
Width = 1455
End
Begin VB.Label Label3
Caption = "原用户密码:"
Height = 255
Left = 600
TabIndex = 2
Top = 1800
Width = 1215
End
Begin VB.Label Label2
Caption = "原用户名:"
Height = 255
Left = 720
TabIndex = 1
Top = 1320
Width = 1335
End
Begin VB.Label Label1
Alignment = 2 'Center
Caption = "修改系统用户信息"
BeginProperty Font
Name = "宋体"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 2160
TabIndex = 0
Top = 360
Width = 3855
End
End
Attribute VB_Name = "modification"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
Dim str As String
Dim input1 As Boolean
input1 = False
str = "select * from Susers"
Set cn = New adodb.Connection
Dim rst As Recordset
Set rst = New Recordset
Dim dat1 As Date
Dim dat2 As Date
Dim lastmoney As Double
cn.ConnectionString = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;Initial Catalog=bank;Data Source=(local)"
cn.Open
rst.Open str, cn, adOpenDynamic, adLockOptimistic
'''''''''''''''''''''''''''
'保证不为空
''''''''''''''''''''''''''
For i = 0 To 3
If Text1(i).Text = "" Then
MsgBox "请把数据全部填上!"
rst.Close
cn.Close
Exit Sub
End If
Next i
If power = "admin" Then
If Combo1.Text = "" Then
MsgBox "请把数据全部填上!"
rst.Close
cn.Close
Exit Sub
End If
End If
''''''''''''''''''''''''''
'查找此帐号
'''''''''''''''''''''''''
rst.MoveFirst
Do While Not rst.EOF
If Trim(rst!ID) = Text1(0).Text And Trim(rst!Spassword) = Text1(1) Then
input1 = True
GoTo AAA
End If
rst.MoveNext
Loop
If input1 = flase Then
MsgBox "查无此帐号或密码不正确!请重新输入!"
rst.Close
cn.Close
Exit Sub
End If
AAA:
rst.Fields("ID") = Text1(2).Text
rst.Fields("Spassword") = Text1(3).Text
If power = "admin" Then
rst.Fields("spower") = Combo1.Text
End If
rst.Update
rst.Close
cn.Close
MsgBox "用户信息修改成功!"
Unload Me
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -