I have a calendar where each day of the month is a rich text box. I am using it to display all the days of the month and then additional text for an "incident" that may have occurred on a particular day. It works great expect I'd like to change the font/justification for the date and the "incident".
When I initialize the calendar I loop through each day and see if I have a record in my "incident" collection that matches the date. If I do, I add the "incident" text to the existing text in the rich text box. This is a must because there can be more than one "incident" per day.
For example, on the 17th there may be 2 incidents. It currently displays as:
17
Late 1:30
Long 5:15
What I'd like is to right justify and bold the date (17) and then change the font of the remaining text.
I'm adding the text to the rich text box with the following code:
txtDay(i).Text = iDay 'iDay = 17 in this case
If Format$(oIncident.IncDate, "dd" = Format$(iDay, "00" Then
txtDay(i).Text = txtDay(i).Text & vbCrLf & _
oIncident.IncCode & " " & _
Hope this makes sense...
When I initialize the calendar I loop through each day and see if I have a record in my "incident" collection that matches the date. If I do, I add the "incident" text to the existing text in the rich text box. This is a must because there can be more than one "incident" per day.
For example, on the 17th there may be 2 incidents. It currently displays as:
17
Late 1:30
Long 5:15
What I'd like is to right justify and bold the date (17) and then change the font of the remaining text.
I'm adding the text to the rich text box with the following code:
txtDay(i).Text = iDay 'iDay = 17 in this case
If Format$(oIncident.IncDate, "dd" = Format$(iDay, "00" Then
txtDay(i).Text = txtDay(i).Text & vbCrLf & _
oIncident.IncCode & " " & _
Hope this makes sense...