Question Locked

Changing field properties on tabular form (MS Access)

0 helpful
2 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Hi,
How to change field properties on the tabular form depending on values of certain fields?F.ex. if the Field1 on record1 has value 0 then I want to show the Field2 value on the same record in red. If I use the following VBA code for the onCurrent event on that form as
If Me.Field1.Value = 0 Then
Me.Field2.ForeColor = 255
Else
Me.Field2.ForeColor = 0
End if

then it changes the color to red on all records (not just where it's needed) shown on the form when I focus on a record with 0 value in the field1.

Please help.
Thanks,
Oleg.

2 replies

by oguintch

I have found that this can be accomplished by using Conditional Formatting on the form

This discussion is closed to new replies.