|
-
Apr 20th, 2010, 10:46 AM
#1
Thread Starter
Hyperactive Member
[RESOLVED] Monthview DayBold problem
I read every thread on here I can find about this but could not find a solution.
What I am doing:
I wrote a loop that goes through all the events added in the database for the specified loop and sets the .DayBold = True for those dates.
Well, it doesn't do anything when it runs. I did the bolding loop in a sub of its own and called it on form_load.
I call it again on monthview_dateclick() as well.
The dateclick searches the database for anything on the selected day and lists it in a simple listbox.
Here is the weird thing...If I click a date that actually has something stored in the database, it works perfectly. All the other dates for the month with events light up bold, but if I click any date that does not have anything scheduled, nothing happens.
Here is the code for my loop to bold the days:
Code:
Private Sub BoldDays()
currentMonth = MonthView1.Month
Call MainCon
Set RS = New ADODB.Recordset
RS.Open ("SELECT * FROM Calendar WHERE month = '" & currentMonth & "'"), Con, adOpenStatic, adLockOptimistic
Do Until RS.EOF
bDate = RS.Fields("date")
MonthView1.DayBold(bDate) = True
Loop
RS.Close
Con.Close
Set RS = Nothing
Set Con = Nothing
End Sub
That runs on startup and doesn't do anything. It runs on subsequent clicks of the calendar as well. But, it only seems to work if I click a day with something scheduled on that event.
I've tried forcing it to click the control for a specified date hoping that would do anything, but I cannot get them to go bold on first run, or when changing months in the calendar.
Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|