?? modification.frm
字號:
VERSION 5.00
Begin VB.Form modification
Caption = "修改系統(tǒng)用戶信息"
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 = "改后權(quán)限:"
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 = "修改系統(tǒng)用戶信息"
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 "請把數(shù)據(jù)全部填上!"
rst.Close
cn.Close
Exit Sub
End If
Next i
If power = "admin" Then
If Combo1.Text = "" Then
MsgBox "請把數(shù)據(jù)全部填上!"
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 + -