Hi,
I have a requirement that when a user click on a record in the datagrid (the record holds Emp_id and his/her project allocation date and release date), then the dates from allocation date to release date in monthview should display bold.
I have written the code but i dont know how to call MonthView1_GetDayBold procedures.
Here is the 2 set of code
Private Sub DataGrid1_Click()
Dim MyConn As ADODB.Connection
Dim MyRecSet1 As New ADODB.Recordset
Set MyConn = New ADODB.Connection
MyConn.ConnectionString = "Provider=SQLOLEDB;Data Source=DIVAKAR-PC\LOCALHOST;Initial Catalog=RMG;User Id=RMG;Password=Thinksoft"
MyConn.Open
On Error Resume Next
If ResAvail.DataGrid1.SelBookmarks.Count = 0 Then
Exit Sub
End If
Emp_Id = ResAvail.DataGrid1.Columns(0).Value
Allocated_On = ResAvail.DataGrid1.Columns(9).Value
Release_Date = ResAvail.DataGrid1.Columns(10).Value
MonthView1_GetDayBold CDate(Date), 1, True
End Sub
Sub MonthView1_GetDayBold(ByVal StartDate As Date, ByVal Count As Integer, State() As Boolean)
d = StartDate
For i = 0 To Count - 1
If d >= Allocated_On And d <= Release_Date Then
State(i) = True ' Mark all blocked days.
End If
d = d + 1
Next
End Sub
As this is a pretty urgent, appreciate if you help me soon