📄 frmdelete.frm
字号:
VERSION 5.00
Begin VB.Form frmdelete
Caption = "图书馆删除信息界面"
ClientHeight = 1875
ClientLeft = 60
ClientTop = 450
ClientWidth = 4200
ControlBox = 0 'False
Icon = "frmdelete.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1875
ScaleWidth = 4200
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton cmddetele
Caption = "删除"
Default = -1 'True
Height = 375
Left = 1560
TabIndex = 2
Top = 1200
Width = 975
End
Begin VB.TextBox txtstuid
Height = 375
Left = 1680
TabIndex = 1
Top = 240
Width = 2415
End
Begin VB.Label Label1
Caption = "读 者 号"
Height = 255
Left = 600
TabIndex = 0
Top = 360
Width = 855
End
End
Attribute VB_Name = "frmdelete"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmddetele_Click()
On Error Resume Next
Dim stuid, strconn As String
stuid = Trim(txtstuid.Text)
strconn = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" & _
App.Path & "\test.mdb;Persist Security Info=False"
Dim conn As New ADODB.Connection
conn.ConnectionString = strconn
conn.Open
strsql = "delete from library where stuid='" & txtstuid & " '"
conn.Execute (strsql)
If Err.Number = 0 Then
MsgBox "删除成功 !"
frmdelete.Hide
frmmain.Show
Else
MsgBox Err.Description
End If
End Sub
Private Sub cmdsee_Click()
Dim conn As New ADODB.Connection
Dim rs As New ADODB.Recordset
Dim strconn As String
Dim strsql As String
strconn = "provider=microsoft.jet.oledb.4.0;data source=" & App.Path & "\test.mdb;persist security info=false"
conn.ConnectionString = strconn
conn.Open
strsql = "select * from [library] WHERE stuid='" & txtstuid & "'"
rs.Open strsql, conn, 1, 1
Set MSHFlexGrid3.DataSource = rs
rs.Close
conn.Close
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -