'listview1功能介绍:用于显示(当读者借书/还书时)该读者已借阅的所有书籍,方便管理员及读者了解信息
'adodc1功能介绍:与datagrid1绑定,显示数据查询信息
Private Sub about_Click()
Form3.Show
End Sub
'数据查询的实现
Private Sub start_Click()
'对应不同的选项进行查询
On Error GoTo wrong
Dim LibName As String
If combo1.ListIndex = -1 Or Text1.Text = "" Then
MsgBox "你没有输入查询内容或选择查询项"
Else
a = Text1.Text
Adodc1.CommandType = adCmdText
i = combo1.ListIndex
b = combo1.List(i)
Set DataGrid1.DataSource = Adodc1
Select Case SSTab1.Tab
Case 2
If i <> 6 Then
Adodc1.RecordSource = "select * from libary where " & b & " like '%" & a & "%'" '借阅信息查询
Adodc1.Refresh
Else
Adodc1.RecordSource = "select * from libary "
Adodc1.Refresh
End If
Case 3
If i <> 7 Then
Adodc1.RecordSource = "select * from S_book whe