Pkacing control back/front of another control

  • Thread starter Thread starter ReidarT
  • Start date Start date
R

ReidarT

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.
regards
reidarT
 
ReidarT said:
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.
 
Back
Top