[RESOLVED] Bind to monthcalander
Hi
If i have a monthcalender control on my form and i grab a recordset that includes dates, how can i get the dates to show on the month calender.
Basically, just on a mobile phone, when you have a calender and you make a reminder, it highlights that date through a bold font.
I am trying to achieve the same effect.
I tried doing the following but it wouldn't work?
Code:
MonthCalendar1.DataBindings.Add("Date", ds.Tables(0), "Dated")
Re: [02/03] Bind to monthcalander
Um, the MonthCalendar doesn't have a "Date" property. You're not going to be able to bind multiple dates like that. If you want to show multiple dates with a bold font then you create an array of Dates and you assign it to the BoldedDates property.
Re: [02/03] Bind to monthcalander
Ok, i'm trying this, but it doesnt seem to be working.
When i pass the array to the bolded dates, it says:
property must assign to the property or use it's value
The type of my array is date and that's what is required to pass in boldeddates.
Any ideas?
Code:
Dim arrays(2) As Date
arrays(0) = "17/04/07"
arrays(1) = "18/04/07"
arrays(2) = "19/04/07"
MonthCalendar1.BoldedDates(arrays)
Re: [02/03] Bind to monthcalander
BoldedDates is a property, not a method. You assign a value to a property, you don't pass it as a parameter:
vb Code:
MonthCalendar1.BoldedDates = arrays
Re: [02/03] Bind to monthcalander
Thanks for that. That worked a charm.
Rep left.