Backgroun color change Continuous form

  • Thread starter Thread starter Les Coover
  • Start date Start date
L

Les Coover

The following code is used to make the background
of one field on a form (Form Default View = Continuous)
to change color when it is selected then change
back to original color when another field is selected.

Private Sub Leaf_Enter()
Me!Leaf.BackColor = 10092543
End Sub

Private Sub Leaf_Exit(Cancel As Integer)
Me!Leaf.BackColor = -2147483643
End Sub

The problem. I want to use the Continuous Default
View but when I select the field all the fields on
every record change. Is there a way to change
the code so that only the field in the active record
will change?

Thanks,

Les
 
The following code is used to make the background
of one field on a form (Form Default View = Continuous)
to change color when it is selected then change
back to original color when another field is selected.

Private Sub Leaf_Enter()
Me!Leaf.BackColor = 10092543
End Sub

Private Sub Leaf_Exit(Cancel As Integer)
Me!Leaf.BackColor = -2147483643
End Sub

The problem. I want to use the Continuous Default
View but when I select the field all the fields on
every record change. Is there a way to change
the code so that only the field in the active record
will change?

Thanks,

Les

See:
http://www.lebans.com
 
In Access 2000 and later, there is a Conditional Formatting property. Open
the subform in Design View. On the menu choose: Format ... Conditional
Formatting, then go to Condition1 and choose: Field has Focus. Set the
background color you want. Repeat for each field you want to change color.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top