帮帮解释一下程序

来源:百度知道 编辑:UC知道 时间:2024/05/27 13:14:06
Private Sub booklistGrid_Click()
Dim i As Integer
'首先获得选定的行号
i = booklistGrid.Row

'将选定行的内容在文本框中显示
addbookTypeNO.text = booklistGrid.TextMatrix(i, 0)
addbookTypeName.text = booklistGrid.TextMatrix(i, 1)
permitdays.text = booklistGrid.TextMatrix(i, 2)
bookTypeOther.text = booklistGrid.TextMatrix(i, 3)

End Sub

Private Sub delbookStyle_Click()
'选定要删除行
Dim str As String
str = addbookTypeNO.text

Dim rs As New ADODB.Recordset
Dim sql As String
sql2 = "select booktypeno from bookType where booktypeno = '" & str & "'"
sql = "delete from bookType where booktypeno = '" & str & "'"
Set rs = TransactSQL(sql2)
If rs.EOF = True Then
MsgBox "该编号图户类别不存在!"
Else
If MsgBox("真的要删除这条记录吗?", vbO

太长了,你说出来错在哪里啊?看的头大。
要不你发到csdn上面去问了,那边高手多,人也多!http://www.csdn.net/
它的论坛上。

看不懂,建议到bbs上去论一下.那里会有你想得到的答案.