I have a form f_Details
which has six columns from the source table t_Details
. One of the columns is col_Name
and another column is checkbox_YN
. Some of the names in the table that are no longer with the company have the checkbox checked (Y). In the form f_Details
, how can I have col_names
change the forecolor to red if the name on that row is no longer with the company and the checkbox is checked?
I have tried the following in the “Got Focus” event of col_Name
:
<code>> Private Sub col_Name_Got Focus()
> If Checkbox_YN.Value Then
> col_Name.Forecolor = RGB(0, 0, 0)
> Else
> col_Name.Forecolor = RGB(255, 255, 179)
> End If
> End Sub
</code>
<code>> Private Sub col_Name_Got Focus()
> If Checkbox_YN.Value Then
> col_Name.Forecolor = RGB(0, 0, 0)
> Else
> col_Name.Forecolor = RGB(255, 255, 179)
> End If
> End Sub
</code>
> Private Sub col_Name_Got Focus()
> If Checkbox_YN.Value Then
> col_Name.Forecolor = RGB(0, 0, 0)
> Else
> col_Name.Forecolor = RGB(255, 255, 179)
> End If
> End Sub
2