📄 frmlendquery.frm
字号:
Caption = "读者姓名"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column02
DataField = "书籍编号"
Caption = "书籍编号"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column03
DataField = "书籍名称"
Caption = "书籍名称"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column04
DataField = "书籍类别"
Caption = "书籍类别"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column05
DataField = "书籍页码"
Caption = "书籍页码"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column06
DataField = "出版社"
Caption = "出版社"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column07
DataField = "借书日期"
Caption = "借书日期"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
BeginProperty Column08
DataField = "还书日期"
Caption = "还书日期"
BeginProperty DataFormat {6D835690-900B-11D0-9484-00A0C91110ED}
Type = 0
Format = ""
HaveTrueFalseNull= 0
FirstDayOfWeek = 0
FirstWeekOfYear = 0
LCID = 2052
SubFormatType = 0
EndProperty
EndProperty
SplitCount = 1
BeginProperty Split0
BeginProperty Column00
ColumnWidth = 1019.906
EndProperty
BeginProperty Column01
ColumnWidth = 1260.284
EndProperty
BeginProperty Column02
ColumnWidth = 1170.142
EndProperty
BeginProperty Column03
ColumnWidth = 1440
EndProperty
BeginProperty Column04
ColumnWidth = 975.118
EndProperty
BeginProperty Column05
ColumnWidth = 945.071
EndProperty
BeginProperty Column06
EndProperty
BeginProperty Column07
ColumnWidth = 1065.26
EndProperty
BeginProperty Column08
ColumnWidth = 1035.213
EndProperty
EndProperty
End
End
Attribute VB_Name = "FrmLendQuery"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdClear_Click()
txtBookID.Text = ""
txtBookName.Text = ""
txtReaderID.Text = ""
txtReaderName.Text = ""
End Sub
Private Sub cmdClose_Click()
Unload Me
End Sub
Private Sub cmdFind_Click()
Dim strSQL As String
Dim strCon(5) As String
Dim i As Integer
'获得所有得查询条件
If txtBookID.Text <> "" Then
If chkMoHu.Value = 1 Then
strCon(1) = "lentInfo.书籍编号 like '%" & txtBookID.Text & "%'"
Else
strCon(1) = "lentInfo.书籍编号='" & txtBookID.Text & "'"
End If
Else
strCon(1) = ""
End If
If txtBookName.Text <> "" Then
If chkMoHu.Value = 1 Then
strCon(2) = "bookInfo.书籍名称 like '%" & txtBookName.Text & "%'"
Else
strCon(2) = "bookInfo.书籍名称='" & txtBookName.Text & "'"
End If
Else
strCon(2) = ""
End If
If txtReaderID.Text <> "" Then
If chkMoHu.Value = 1 Then
strCon(3) = "lentInfo.读者编号 like '%" & txtReaderID.Text & "%'"
Else
strCon(3) = "lentInfo.读者编号='" & txtReaderID.Text & "'"
End If
Else
strCon(3) = ""
End If
If txtReaderName.Text <> "" Then
If chkMoHu.Value = 1 Then
strCon(4) = "readerInfo.读者姓名 like '%" & txtReaderName.Text & "%'"
Else
strCon(4) = "readerInfo.读者姓名='" & txtReaderName.Text & "'"
End If
Else
strCon(4) = ""
End If
If dtpLendDate.Value = 1 Then
If chkMoHu.Value = 1 Then
strCon(5) = "lentInfo.借书日期 like #" & dtpLendDate.Value & "#"
Else
strCon(5) = "lentInfo.借书日期=#" & dtpLendDate.Value & "#"
End If
Else
strCon(5) = ""
End If
strSQL = "select lentInfo.读者编号,readerInfo.读者姓名,lentInfo.书籍编号," _
& " bookInfo.书籍名称,bookType.书籍类别,bookInfo.出版社,bookInfo.书籍页码,lentInfo.借书日期," _
& " lentInfo.还书日期,lentInfo.超出天数,lentInfo.罚款金额 from readerInfo,bookInfo,lentInfo,bookType " _
& " where readerInfo.读者编号=lentInfo.读者编号 and bookInfo.书籍编号=lentInfo.书籍编号 " _
& " and bookType.类别代码=bookInfo.类别代码 "
For i = 1 To 5
If strCon(i) <> "" Then
strSQL = strSQL + " and " + strCon(i)
End If
Next
Adodc1.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" & App.Path & "\图书馆查询管理系统.mdb;Persist Security Info=False"
Adodc1.CursorLocation = adUseClient
Adodc1.CommandType = adCmdText
Adodc1.RecordSource = strSQL
Adodc1.Refresh
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -