Backgroun color change Continuous form

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
 
F

fredg

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
 
A

Arvin Meyer

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top