📄 report.frm
字号:
Unload frmReport
End Sub
Private Sub Form_Activate()
'frmReport.Show
End Sub
Private Sub Form_Load()
optamount.value = False
optuser.value = False
optbook.value = True
fraBookReport.Visible = True
fraUserReport.Visible = False
fraamount.Visible = False
optborrowed.value = False
fralost(0).Visible = False
fraborrowed(2).Visible = True
franot(1).Visible = False
gettheothers
opttoday.value = False
frmbreport(0).Visible = False
frmbreport(1).Visible = False
frmbreport(2).Visible = False
opttoday2.value = False
End Sub
Private Sub gettheothers()
End Sub
Private Sub Form_LostFocus()
'Unload frmReport
End Sub
Private Sub optactive_Click()
lststat.Clear
Dim xx, county As Long
report(1).Visible = True
report(0).Visible = False
report(2).Visible = False
datactive.Recordset.MoveFirst
Do While Not datactive.Recordset.EOF
xx = datactive.Recordset.Fields("studentFName") & " " & datactive.Recordset.Fields("studentSName") & " " & datactive.Recordset.Fields("student3rdname")
lststat.AddItem xx
datactive.Recordset.movenext
county = county + 1
Loop
lblstat.Caption = "Students Who are active add upto" & " " & county
End Sub
Private Sub optamount_Click()
fraUserReport.Visible = False
fraBookReport.Visible = False
fraamount.Visible = True
opttamount.value = True
report3(1).Visible = True
report3(0).Visible = False
report3(2).Visible = False
frmToday.Visible = True
frmthisyear1.Visible = False
frmthismonth.Visible = False
End Sub
Private Sub optbook_Click()
optamount.value = False
optuser.value = False
optbook.value = True
fraBookReport.Visible = True
fraUserReport.Visible = False
fraamount.Visible = False
optborrowed.value = True
fralost(0).Visible = False
fraborrowed(2).Visible = True
franot(1).Visible = False
gettheothers
opttoday.value = True
frmbreport(0).Visible = True
frmbreport(1).Visible = False
frmbreport(2).Visible = False
End Sub
Private Sub optborrowed_Click()
fralost(0).Visible = False
fraborrowed(2).Visible = True
franot(1).Visible = False
opttoday.value = True
frmbreport(0).Visible = True
frmbreport(1).Visible = False
frmbreport(2).Visible = False
End Sub
Private Sub optlost_Click()
fralost(0).Visible = True
fraborrowed(2).Visible = False
franot(1).Visible = False
End Sub
Private Sub optmonth_Click(Index As Integer)
'Select Case Index
'Case 0
frmbreport(0).Visible = False
frmbreport(1).Visible = False
frmbreport(2).Visible = True
Dim d As Date, xx1 As String, countm As Long
d = Date
countm = 0
On Error GoTo err1:
datbm.Recordset.MoveFirst
Do While datbm.Recordset.EOF
If datbm.Recordset.Fields("dateborrowed") = d Then
xx1 = datbm.Recordset.Fields("bookID")
lstbm.AddItem xx1
countm = countm + 1
Else
End If
datbm.Recordset.movenext
Loop
err1:
lblbm.Caption = "Books Borrowed this Month add upto" & " " & countm
'Case 1
'frmToday.Visible = False
'frmthisyear1.Visible = False
'frmthismonth.Visible = True
'End Select
End Sub
Private Sub optmonth1_Click()
frmtod.Visible = False
frmyer.Visible = False
frmmont.Visible = True
End Sub
Private Sub optnot_Click()
lstnotb.Clear
fralost(0).Visible = False
fraborrowed(2).Visible = False
franot(1).Visible = True
Dim xxx As String, countp As Long
countp = 0
On Error GoTo err:
datnotb.Recordset.MoveFirst
Do While Not datnotb.Recordset.EOF
xxx = datnotb.Recordset.Fields("bookname")
lstnotb.AddItem xxx
datnotb.Recordset.movenext
countp = countp + 1
Loop
err:
lblnotb.Caption = "Books that are Not borrowed Add upto" & " " & countp
End Sub
Private Sub optnotactive_Click()
lstnot.Clear
Dim xx, county As Long
report(1).Visible = False
report(0).Visible = True
report(2).Visible = False
datnot.Recordset.MoveFirst
Do While Not datnot.Recordset.EOF
xx = datnot.Recordset.Fields("studentFName") & " " & datnot.Recordset.Fields("studentSName") & " " & datnot.Recordset.Fields("student3rdname")
lstnot.AddItem xx
datnot.Recordset.movenext
county = county + 1
Loop
lblnot.Caption = "Who are not active add upto" & " " & county
End Sub
Private Sub opttamount_Click()
report3(1).Visible = True
report3(0).Visible = False
report3(2).Visible = False
opttoday2.value = True
frmToday.Visible = True
frmthisyear1.Visible = False
frmthismonth.Visible = False
End Sub
Private Sub opttcharges_Click()
report3(1).Visible = False
report3(0).Visible = True
report3(2).Visible = False
opttoday1.value = True
frmtod.Visible = True
frmyer.Visible = False
frmmont.Visible = False
End Sub
Private Sub opttdue_Click()
report3(1).Visible = False
report3(0).Visible = False
report3(2).Visible = True
End Sub
Private Sub opttoday_Click()
frmbreport(0).Visible = True
frmbreport(1).Visible = False
frmbreport(2).Visible = False
lstbt.Clear
Dim d As Date, xx1 As String, countm As Long
d = Date
countm = 0
On Error GoTo err1:
datbt.Recordset.MoveFirst
Do While Not datbt.Recordset.EOF
If datbt.Recordset.Fields("dateborrowed") = d Then
xx1 = datbt.Recordset.Fields("bookname")
lstbt.AddItem xx1
countm = countm + 1
Else
End If
datbt.Recordset.movenext
Loop
err1:
lblbt.Caption = "Books Borrowed today are" & " " & countm
End Sub
Private Sub opttoday1_Click()
frmtod.Visible = True
frmyer.Visible = False
frmmont.Visible = False
End Sub
Private Sub opttoday2_Click()
frmToday.Visible = True
frmthisyear1.Visible = False
frmthismonth.Visible = False
End Sub
Private Sub optuser_Click()
fraUserReport.Visible = True
fraBookReport.Visible = False
fraamount.Visible = False
optactive.value = True
optnotactive.value = False
optwithbooks.value = False
report(1).Visible = True
report(0).Visible = False
report(2).Visible = False
End Sub
Private Sub optwithbooks_Click()
lstwith.Clear
Dim xx, county As Long, clarify
report(1).Visible = False
report(0).Visible = False
report(2).Visible = True
On Error GoTo ERRR:
datwith.Recordset.MoveFirst
Do While Not datwith.Recordset.EOF
xx = datwith.Recordset.Fields("studentFName") & " " & datwith.Recordset.Fields("studentSName") & " " & datwith.Recordset.Fields("student3rdname")
If clarify <> datwith.Recordset.Fields("studentFName") Then
lstwith.AddItem xx
datwith.Recordset.movenext
county = county + 1
clarify = datwith.Recordset.Fields("studentFName")
Else
datwith.Recordset.movenext
End If
Loop
ERRR:
lblwith.Caption = "Students Who have books add upto" & " " & county
End Sub
Private Sub optyear_Click()
frmbreport(0).Visible = False
frmbreport(1).Visible = True
frmbreport(2).Visible = False
Dim d As Date, xx1 As String, countm As Long
d = Date
cuontm = 0
On Error GoTo err1:
datby.Recordset.MoveFirst
Do While datby.Recordset.EOF
If datby.Recordset.Fields("dateborrowed") = d Then
xx1 = datby.Recordset.Fields("bookname")
lstby.AddItem xx1
countm = countm + 1
Else
End If
datby.Recordset.movenext
Loop
err1:
lblby.Caption = "Books Borrowed this Month add upto" & " " & cuontm
End Sub
Private Sub optyear1_Click()
frmtod.Visible = False
frmyer.Visible = True
frmmont.Visible = False
End Sub
Private Sub optyearear_Click()
frmToday.Visible = False
frmthisyear1.Visible = True
frmthismonth.Visible = False
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -