Format Send to Back

  • Thread starter Thread starter Alan White
  • Start date Start date
A

Alan White

I want to change the design of a form using code to add a
new textbox control and place it behind existing controls.

How do you do the Menu Bar 'Format' 'Send to Back' menu
option using code?

Thank you,
Alan
 
Try:
RunCommand acCmdSendToBack

Alternatively, you can bring the other box forward at runtime with SetFocus.
 
In addition to Allen's reply, please reconsider having a textbox control be
created during the running of the database. There is a limit to how many
controls can be put onto a form -- and the number includes those that were
once added and then deleted.

Instead, why not put the extra textbox on the form, and toggle its
visibility property if you want to see it or not?
 
Thank you Ken & Allen

I only want to modify the form in design mode, not while
the application code is running. The reason I want to do
it by code is I have many forms of similar design I want
to change and I don't want to have to use the UI and do it
manually.

I want to use the txtbox in association with conditional
formating to highlight the current row in a continuous
form. The ControlSource of the txtbox will be a function
to retrieve the recordnumber. Conditional formatting will
compare this value to [form].CurrentRecord. The only thing
I am unable to do is to send the txtBox behind the other
controls that are transparent.

To use the Runcommand how do I select the txtbox on the
form in design mode by code? Mannually I can click on it
or Tab to it. How will the Runcommand know which txtbox I
am referring to?

Alan.
 
Alan White said:
To use the Runcommand how do I select the txtbox on the
form in design mode by code? Mannually I can click on it
or Tab to it. How will the Runcommand know which txtbox I
am referring to?

AFAIK, you cannot do that in design view.
Access does not expose a Z-index type of property.
 
Back
Top