I'm trying to change a textbox color on my form based on whether a box is checked in the record. The display is off, though the color I want is always displayed for the record I was just at:
What I want:
checked? Color
chk pink
chk pink
chk pink
not white
chk pink
not white
not white
not white
what I get:
checked? Color
chk pink
chk pink
chk pink
not pink
chk white
not pink
not white
not white
This is not specific to color changes, either. When working with this form earlier, I was copying text from the record into a textbox, but always got the text from the record which was previously selected, and not the text from the record currently selected.
Is form_current like a 'before' event? Should I be using a different event?
What I want:
checked? Color
chk pink
chk pink
chk pink
not white
chk pink
not white
not white
not white
what I get:
checked? Color
chk pink
chk pink
chk pink
not pink
chk white
not pink
not white
not white
Code:
Private Sub Form_Current()
If Me.CI.Value = True Then
Me.txtComments.BackColor = RGB(255, 180, 255)
Else
Me.txtComments.BackColor = RGB(255, 255, 255)
End If
End Sub
This is not specific to color changes, either. When working with this form earlier, I was copying text from the record into a textbox, but always got the text from the record which was previously selected, and not the text from the record currently selected.
Is form_current like a 'before' event? Should I be using a different event?