📄 form6.frm
字号:
VERSION 5.00
Begin VB.Form Form6
Caption = "删除过期记录"
ClientHeight = 3060
ClientLeft = 60
ClientTop = 345
ClientWidth = 6495
ControlBox = 0 'False
LinkTopic = "Form6"
ScaleHeight = 3060
ScaleWidth = 6495
StartUpPosition = 2 '屏幕中心
Begin VB.CommandButton Command2
Caption = "退 出"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 3960
TabIndex = 3
Top = 2160
Width = 1455
End
Begin VB.CommandButton Command1
Caption = "确 定"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 495
Left = 960
TabIndex = 2
Top = 2160
Width = 1455
End
Begin VB.TextBox Text2
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 1
Top = 960
Width = 2295
End
Begin VB.TextBox Text1
BeginProperty Font
Name = "宋体"
Size = 12
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 3480
TabIndex = 0
Top = 240
Width = 2295
End
Begin VB.Label Label2
Caption = "请输入发票号:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 5
Top = 960
Width = 2415
End
Begin VB.Label Label1
Caption = "请输入发票代码:"
BeginProperty Font
Name = "宋体"
Size = 15
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 375
Left = 480
TabIndex = 4
Top = 240
Width = 2535
End
End
Attribute VB_Name = "Form6"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Command1_Click()
If Text1.Text = "" Or Text2.Text = "" Then
MsgBox ("信息录入不全,请输入发票代码或发票号。")
Exit Sub
End If
Dim sc As Integer
sc = MsgBox("您真的要删除吗???", 1)
If sc = 1 Then
Dim cn1 As ADODB.Connection
Set cn1 = New ADODB.Connection
cn1.ConnectionString = "Provider=MSDASQL.1;Persist Security Info=False;User ID=sa;Data Source=qfgl"
cn1.Open
Dim cm1 As ADODB.Command
Set cm1 = New ADODB.Command
cm1.CommandTimeout = 0
cm1.ActiveConnection = cn1
cm1.CommandType = adCmdText
cm1.CommandText = "delete from dkkc where fpdm='" & Trim(Text1.Text) & "'" & " and fph='" & Trim(Text2.Text) & "'"
cm1.Execute
cn1.Close
Else
Text1.Text = ""
Text2.Text = ""
End If
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -