?? 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 + -