Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Highlighting background on continous form

2 views
Skip to first unread message

ReidarT

unread,
Aug 9, 2005, 9:25:07 AM8/9/05
to
I just wanted to thank Marshall Barton for his tip on this subject.
It was simple and effective!

regards
reidarT

ReidarT wrote:

>In the Format menu you have the ability to place a control back another
>control.
>I have a continous form with a control placed behind other controls. I want
>to have this field colored when it gets focused.
>I can make the field in focus but it then is in front of all the other
>fields.
>How do I programatically set the field behind the other fields.


You can not do that programatically, it's a design time
operation.

In addition to that, the control with the focus is
automatically brought to the front so you do not want that
control to get the focus. If you are using the control to
provide a highlight for the current record, then set it's
TabStop property to No, Locked to Yes and Enabled to No so
there is no way it can get the focus.

To make the text box's BackColor property change for the
current record, add a hidden text box to the form's
header/footer section and use the form's Current event to
set the text box to the current record's primary key. You
can then use Conditional Formatting to set its BackColor
property with the Expression Is PKfiield = thetextbox.

--
Marsh
MVP [MS Access]


0 new messages