ioncila
08-24-2012, 11:22 AM
Hi
I have the code below in a textbox and I want that date value be red if it's earlier than today. But I'm not getting that.
Private Sub txtValDss_Enter()
g_bForm = True
frmCalendar.Show_Cal
Me.txtValDss.Value = g_sDate
If g_sDate < Now Then
Me.txtValDss.ForeColor = RGB(255, 0, 0)
End If
With ActiveControl.Object
txtValDss.Value = Format(txtValDss.Value, "dd mmm yyyy")
End With
End Sub
I'm using the event 'Enter' to popup the calendar form
May you provide me some help please?
Thak you in advance.
Ioncila
I have the code below in a textbox and I want that date value be red if it's earlier than today. But I'm not getting that.
Private Sub txtValDss_Enter()
g_bForm = True
frmCalendar.Show_Cal
Me.txtValDss.Value = g_sDate
If g_sDate < Now Then
Me.txtValDss.ForeColor = RGB(255, 0, 0)
End If
With ActiveControl.Object
txtValDss.Value = Format(txtValDss.Value, "dd mmm yyyy")
End With
End Sub
I'm using the event 'Enter' to popup the calendar form
May you provide me some help please?
Thak you in advance.
Ioncila