📄 frmshanchuguanliyuan.frm
字号:
VERSION 5.00
Object = "{5E9E78A0-531B-11CF-91F6-C2863C385E30}#1.0#0"; "MSFLXGRD.OCX"
Begin VB.Form frmshanchuguanliyuan
BorderStyle = 1 'Fixed Single
Caption = "删除管理员"
ClientHeight = 5610
ClientLeft = 4350
ClientTop = 3270
ClientWidth = 3660
Icon = "frmshanchuguanliyuan.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5610
ScaleWidth = 3660
Begin MSFlexGridLib.MSFlexGrid msfxinxi
Height = 5415
Left = 120
TabIndex = 4
Top = 120
Width = 2055
_ExtentX = 3625
_ExtentY = 9551
_Version = 393216
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2400
TabIndex = 3
Top = 5040
Width = 1095
End
Begin VB.CommandButton Command1
Caption = "删除"
Height = 375
Left = 2400
TabIndex = 2
Top = 4440
Width = 1095
End
Begin VB.TextBox txtguanliyuanid
Height = 375
Left = 2280
TabIndex = 1
Top = 3840
Width = 1215
End
Begin VB.Label Label1
Caption = "管理员ID"
Height = 375
Left = 2280
TabIndex = 0
Top = 3240
Width = 1095
End
End
Attribute VB_Name = "frmshanchuguanliyuan"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
On Error Resume Next
If MsgBox("数据删除后将不能恢复,确认要删除当前数据吗?", vbQuestion + vbYesNo, "删除数据") = vbNo Then Exit Sub
'rct.MoveFirst
'rct.Filter = "guanliyuan = '" & txtguanliyuanid.Text & "'"
Dim sqlstr As String
sqlstr = "select * from guanliyuan where guanliyuan='" & txtguanliyuanid & "'"
If querydata(sqlstr) = False Then Exit Sub
rct.MoveFirst
rct.Delete
If rct.EOF Then
rct.MoveFirst
Else
rct.MoveNext
End If
Call shuaxin
txtguanliyuanid.Text = ""
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Private Sub Form_Load()
Call shuaxin
End Sub
Private Sub shuaxin()
Dim chaxun As String
If chaxun = Empty Then
chaxun = "select * from guanliyuan"
End If
If querydata(chaxun) = True Then
End If
msfxinxi.Rows = 1
msfxinxi.Cols = 2
msfxinxi.Row = 0
msfxinxi.Col = 0
msfxinxi.Text = "管理员ID"
msfxinxi.ColWidth(0) = 800
msfxinxi.CellAlignment = flexAlignCenterCenter
msfxinxi.Col = 1
msfxinxi.Text = "密码"
msfxinxi.ColWidth(1) = 800
msfxinxi.CellAlignment = flexAlignCenterCenter
On Error Resume Next
rct.MoveFirst
If Err.Number > 0 Then Exit Sub
Do While Not rct.EOF
msfxinxi.AddItem (Empty)
msfxinxi.Row = msfxinxi.Rows - 1
msfxinxi.Col = 0
msfxinxi.Text = rct.Fields("guanliyuan").Value
msfxinxi.Col = 1
msfxinxi.Text = rct.Fields("mima").Value
rct.MoveNext
Loop
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -