J
JamesJ
Hi. I have 4 text boxes occupying the row on a continuous form.
Reminder, ReminderDate, ReminderTime and ReminderTypeID.
The value of ReminderTypeID field is either 1, 2 or 3. I would like
to have the entire row's BackColor and ForeColor set depending
on the value of the ReminderID field. In other words there will be
3 different BackColors for each text box.I tried setting the colors
in the OnCurrent of the form using the following code for just 1 field
but the BackColor gets changed for each record. Not even sure if the
code is in the correct event.
Private Sub Form_Current()
If Me!ReminderTypeID.Value = 1 Then
Me!Reminder.BackColor = vbRed
Me!Reminder.ForeColor = vbWhite
End If
End Sub
Any help will be appreciated as always,
James
Reminder, ReminderDate, ReminderTime and ReminderTypeID.
The value of ReminderTypeID field is either 1, 2 or 3. I would like
to have the entire row's BackColor and ForeColor set depending
on the value of the ReminderID field. In other words there will be
3 different BackColors for each text box.I tried setting the colors
in the OnCurrent of the form using the following code for just 1 field
but the BackColor gets changed for each record. Not even sure if the
code is in the correct event.
Private Sub Form_Current()
If Me!ReminderTypeID.Value = 1 Then
Me!Reminder.BackColor = vbRed
Me!Reminder.ForeColor = vbWhite
End If
End Sub
Any help will be appreciated as always,
James