📄 frmdelete.frm
字号:
TabIndex = 20
Top = 1800
Width = 975
End
Begin VB.Label Label18
Caption = "订购数量:"
Height = 255
Left = 240
TabIndex = 19
Top = 1440
Width = 975
End
Begin VB.Label Label17
Caption = "书籍价格:"
Height = 255
Left = 240
TabIndex = 18
Top = 1080
Width = 975
End
Begin VB.Label Label16
Caption = "订购日期:"
Height = 255
Left = 240
TabIndex = 17
Top = 720
Width = 975
End
Begin VB.Label Label15
Caption = "订购金额:"
Height = 255
Left = 4920
TabIndex = 16
Top = 360
Width = 975
End
Begin VB.Label Label14
Caption = "语 系:"
Height = 255
Left = 240
TabIndex = 15
Top = 360
Width = 975
End
End
Begin VB.Frame Frame1
Height = 3735
Left = 120
TabIndex = 0
Top = 120
Width = 9855
Begin VB.Label Label13
Caption = "开户行:"
Height = 255
Left = 4920
TabIndex = 13
Top = 3240
Width = 735
End
Begin VB.Label Label12
Caption = "银行帐号:"
Height = 255
Left = 240
TabIndex = 12
Top = 3240
Width = 975
End
Begin VB.Label Label11
Caption = "通信地址:"
Height = 255
Left = 240
TabIndex = 11
Top = 2880
Width = 975
End
Begin VB.Label Label10
Caption = "联系人:"
Height = 255
Left = 4920
TabIndex = 10
Top = 2520
Width = 735
End
Begin VB.Label Label9
Caption = "联系电话:"
Height = 255
Left = 240
TabIndex = 9
Top = 2520
Width = 975
End
Begin VB.Label Label8
Caption = "译 者:"
Height = 255
Left = 4920
TabIndex = 8
Top = 2160
Width = 735
End
Begin VB.Label Label7
Caption = "作 者:"
Height = 255
Left = 240
TabIndex = 7
Top = 2160
Width = 975
End
Begin VB.Label Label6
Caption = "出 版 社:"
Height = 255
Left = 240
TabIndex = 6
Top = 1800
Width = 975
End
Begin VB.Label Label5
Caption = "分 类 号:"
Height = 255
Left = 240
TabIndex = 5
Top = 1440
Width = 975
End
Begin VB.Label Label4
Caption = "英文名称:"
Height = 255
Left = 240
TabIndex = 4
Top = 1080
Width = 975
End
Begin VB.Label Label3
Caption = "中文名称:"
Height = 255
Left = 240
TabIndex = 3
Top = 720
Width = 975
End
Begin VB.Label Label2
Caption = "ISBN :"
Height = 255
Left = 4920
TabIndex = 2
Top = 360
Width = 735
End
Begin VB.Label Label1
Caption = "登记编号:"
Height = 255
Left = 240
TabIndex = 1
Top = 360
Width = 975
End
End
Begin VB.Line Line1
BorderColor = &H80000001&
BorderWidth = 2
X1 = 120
X2 = 10080
Y1 = 3960
Y2 = 3960
End
End
Attribute VB_Name = "frmdelete"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim cn As ADODB.Connection
Dim rs As ADODB.Recordset
Private Sub Command1_Click()
Dim sc, i As String
i = MsgBox("是否修改此条记录!", vbYesNo + vbOKOnly, "提示")
If i = vbYes Then
sc = "delete from newtb where 登记编号='" & txtID.Text & "'"
cn.Execute (sc)
Else
rs.CancelUpdate
End If
End Sub
Private Sub Command2_Click()
clear
End Sub
Private Sub Command3_Click()
frmnew.DataGrid1.Refresh
frmnew.Adodc1.Refresh
Me.Hide
End Sub
Private Sub Form_Load()
Me.Height = 7455
Me.Width = 10455
Set cn = New ADODB.Connection
cn.Open "Provider=SQLOLEDB.1;Persist Security Info=False;User ID=sa;Initial Catalog=BOOK;Data Source=MRSX05"
Set rs = New ADODB.Recordset
rs.Open "newtb", cn, adOpenStatic, adLockOptimistic, adCmdTable
load
rs.Fields.Refresh
End Sub
Sub load()
Adodc1.Refresh
txtID.Text = Adodc1.Recordset.Fields(0)
txtISBN.Text = Adodc1.Recordset.Fields(1)
txtCH.Text = Adodc1.Recordset.Fields(2)
txtEN.Text = Adodc1.Recordset.Fields(3)
txtsort.Text = Adodc1.Recordset.Fields(4)
txtColl.Text = Adodc1.Recordset.Fields(5)
txtauth.Text = Adodc1.Recordset.Fields(6)
txttran.Text = Adodc1.Recordset.Fields(7)
txtltel.Text = Adodc1.Recordset.Fields(8)
txtlp.Text = Adodc1.Recordset.Fields(9)
txtaddc.Text = Adodc1.Recordset.Fields(10)
txtbacc.Text = Adodc1.Recordset.Fields(11)
txtacc.Text = Adodc1.Recordset.Fields(12)
txtlana.Text = Adodc1.Recordset.Fields(13)
txtmoney.Text = Adodc1.Recordset.Fields(14)
DTPicker1.Value = Adodc1.Recordset.Fields(15)
txtpric.Text = Adodc1.Recordset.Fields(16)
txthow.Text = Adodc1.Recordset.Fields(17)
txtamou.Text = Adodc1.Recordset.Fields(18)
txtrem.Text = Adodc1.Recordset.Fields(19)
End Sub
Sub clear()
txtID.Text = ""
txtISBN.Text = ""
txtCH.Text = ""
txtEN.Text = ""
txtsort.Text = ""
txtColl.Text = ""
txtauth.Text = ""
txttran.Text = ""
txtltel.Text = ""
txtlp.Text = ""
txtaddc.Text = ""
txtbacc.Text = ""
txtacc.Text = ""
txtlana.Text = ""
txtmoney.Text = ""
txtpric.Text = ""
txthow.Text = ""
txtamou.Text = ""
txtrem.Text = ""
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -