📄 form7.frm
字号:
VERSION 5.00
Begin VB.Form Form7
Caption = "删除物品"
ClientHeight = 4560
ClientLeft = 60
ClientTop = 345
ClientWidth = 4680
LinkTopic = "Form7"
ScaleHeight = 4560
ScaleWidth = 4680
StartUpPosition = 3 'Windows Default
Begin VB.Frame Frame1
Caption = "删除物品"
Height = 4695
Left = 0
TabIndex = 0
Top = 120
Width = 4095
Begin VB.TextBox Text1
Height = 375
Left = 1320
TabIndex = 7
Top = 600
Width = 2055
End
Begin VB.TextBox Text2
Height = 375
Left = 1320
TabIndex = 6
Top = 1080
Width = 2055
End
Begin VB.TextBox Text3
Height = 375
Left = 1320
TabIndex = 5
Top = 1560
Width = 2055
End
Begin VB.CommandButton Command1
Caption = "确定"
Height = 375
Left = 720
TabIndex = 4
Top = 3960
Width = 975
End
Begin VB.CommandButton Command2
Caption = "退出"
Height = 375
Left = 2640
TabIndex = 3
Top = 3960
Width = 855
End
Begin VB.TextBox Text5
Height = 375
Left = 1320
TabIndex = 2
Top = 2520
Width = 2055
End
Begin VB.TextBox Text6
Height = 375
Left = 1320
TabIndex = 1
Top = 3120
Width = 2055
End
Begin VB.Label Label1
Caption = "物品名称"
Height = 255
Left = 480
TabIndex = 12
Top = 720
Width = 855
End
Begin VB.Label Label2
Caption = "物品ID"
Height = 255
Left = 480
TabIndex = 11
Top = 1200
Width = 615
End
Begin VB.Label Label3
Caption = "价格"
Height = 255
Left = 480
TabIndex = 10
Top = 1680
Width = 735
End
Begin VB.Label Label5
Caption = "数量"
Height = 375
Left = 600
TabIndex = 9
Top = 2640
Width = 735
End
Begin VB.Label Label6
Caption = "用途"
Height = 375
Left = 600
TabIndex = 8
Top = 3120
Width = 855
End
End
End
Attribute VB_Name = "Form7"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Public rs As ADODB.Recordset
Public db As ADODB.Connection
Public Sub clearfiled()
Text1.Text = ""
Text2.Text = ""
Text3.Text = ""
Text4.Text = ""
End Sub
Private Sub Command1_Click()
rs.Close
If MsgBox("真的要删除吗?", vbYesNo, "信息提示") = vbYes Then
rs.Open "delete from 酒店登记 where 身份证号码='" & Trim(sf.Text) & "'"
MsgBox ("记录已删除")
Else
clearfiled
rs.Close
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -