H
hireagenius via AccessMonster.com
Hi and thank you for your time,
I have a form/subform with a one to many relationship. In the subform, I
have fields Oct, Nov, Dec, etc in each record. I want to compare the Nov
date to the Oct date and change the BackColor if the dates do not equal. The
code works for the current record but the Backcolor will also change in the
next record on the many side without making the proper comparison.
I have the following code on the On Current property of the subform.
Let Nov.BackColor = 123
If Me.Nov.Value > Me.Oct.Value Then
Me.Nov.Backcolor = 456
End If
So, the Nov Backcolor will change to 123 if Nov is greater than Oct. But it
will also change in the next record, whether or not Nov is greater than Oct.
I have a form/subform with a one to many relationship. In the subform, I
have fields Oct, Nov, Dec, etc in each record. I want to compare the Nov
date to the Oct date and change the BackColor if the dates do not equal. The
code works for the current record but the Backcolor will also change in the
next record on the many side without making the proper comparison.
I have the following code on the On Current property of the subform.
Let Nov.BackColor = 123
If Me.Nov.Value > Me.Oct.Value Then
Me.Nov.Backcolor = 456
End If
So, the Nov Backcolor will change to 123 if Nov is greater than Oct. But it
will also change in the next record, whether or not Nov is greater than Oct.