strSQL = "Select [Job Number], Initials, FCheckOut, FInDate " & _
"From Transactions Where ([FCheckOut] " & _
"Between " & lngFirstOfMonth & " And " & lngLastOfMonth & _
" or [FInDate] Between " & lngFirstOfMonth & " And " & lngLastOfMonth & _
" or ([FCheckOut] < " & lngFirstOfMonth & _
" and [FInDate] > " & lngLastOfMonth & ")) and asset=" & asset & _
" ORDER BY [FCheckOut], " & _
"[Job Number];"
Private Sub Asset_Click()
cboMonth_AfterUpdate
End Sub
Private Sub cboMonth_AfterUpdate()
On Error GoTo Err_cboMonth_AfterUpdate
Select Case Me![cboMonth]
Case "January"
objCurrentDate.Month = 1
Case "February"
objCurrentDate.Month = 2
Case "March"
objCurrentDate.Month = 3
Case "April"
objCurrentDate.Month = 4
Case "May"
objCurrentDate.Month = 5
Case "June"
objCurrentDate.Month = 6
Case "July"
objCurrentDate.Month = 7
Case "August"
objCurrentDate.Month = 8
Case "September"
objCurrentDate.Month = 9
Case "October"
objCurrentDate.Month = 10
Case "November"
objCurrentDate.Month = 11
Case "December"
objCurrentDate.Month = 12
Case Else
End Select
PopulateCalendar
Exit_cboMonth_AfterUpdate:
Exit Sub
Err_cboMonth_AfterUpdate:
MsgBox Err.Description, vbExclamation, "Error in cboMonth_AfterUpdate()"
Resume Exit_cboMonth_AfterUpdate
End Sub
Private Sub Asset_AfterUpdate()
cboMonth_AfterUpdate
End Sub
'Ridders - 1st attempt at colour formatting - didn't work
'Dim i As Integer
'For i = 1 To 42
' If Me("txtDayBlock" & i) <> "" Then
' Me("txtDayBlock" & i).BackColor = vbRed
' Else
' Me("txtDayBlock" & i).BackColor = vbWhite
' End If
'Next
'If this block is the system date, change its color (CFB 1-25-8)
If lngBlockDate = lngSystemDate Then
ctlDayBlock.BackColor = RGB(0, 0, 255)
ctlDayBlock.ForeColor = QBColor(15)
Set ctlSystemDateBlock = ctlDayBlock
blnSystemDateIsShown = True
Else
'==========================
'Colin Riddington (ridders) - added code here
'date not populated
If astrCalendarBlocks(bytBlockCounter) = "" Then
ctlDayBlock.BackColor = vbWhite 'QBColor(15)
ctlDayBlock.ForeColor = vbBlue '838868 '====>
Else
'date populated so show in red with white text
ctlDayBlock.BackColor = vbRed
ctlDayBlock.ForeColor = vbWhite
End If
'=========================
End If