dean_hurrell
Registered User.
- Local time
- Today, 00:47
- Joined
- Jan 8, 2013
- Messages
- 14
Hi
I am designing a holiday planner within my database which shows employee's holiday booked, cancelled and declined.
I found a very helpful demo database which I have slightly amended to suit what I need, but I am having problems changing the caption labels to value's within the recordset table.
Part of the code I am using at the moment is
I am wanting the report to change the caption to the holiday hours booked where the caption is H. The other codes, DEC, CAN & B can remain a they are.
I have played around with the code, but being a novice at this I have not had any luck, but I am pretty sure I am going wrong where I have highlighted the code when it comes to changing the caption.
Hope this makes sense, and someone may be able to let me know where I am going wrong, if not I can provide more information. Many Thanks
I am designing a holiday planner within my database which shows employee's holiday booked, cancelled and declined.
I found a very helpful demo database which I have slightly amended to suit what I need, but I am having problems changing the caption labels to value's within the recordset table.
Part of the code I am using at the moment is
Code:
Dim strCaption As String
Dim strKey As String
strKey = datStartDate
strCaption = ""
strCaption = colCalendarDates.Item(strKey)
colCalendarDates.Remove strKey
If strCaption = "H" Then
.Caption = [COLOR=Red]DLookup("Holiday Hours]", "[TBL_HOLIDAY_HOURS_FOR _IND_HOLIDAY_REPORT]")[/COLOR]
.Bold = False
Else
.Caption = strCaption
.Bold = True
Select Case strCaption
Case "DEC"
.BackColor = 255
Case "H"
.BackColor = 16711680
Case "CAN"
.BackColor = 0
Case "B"
.BackColor = 5753088
End Select
.ForeColor = vbWhite
End If
I am wanting the report to change the caption to the holiday hours booked where the caption is H. The other codes, DEC, CAN & B can remain a they are.
I have played around with the code, but being a novice at this I have not had any luck, but I am pretty sure I am going wrong where I have highlighted the code when it comes to changing the caption.
Hope this makes sense, and someone may be able to let me know where I am going wrong, if not I can provide more information. Many Thanks