Format Send to Back

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
 
A

Allen Browne

Try:
RunCommand acCmdSendToBack

Alternatively, you can bring the other box forward at runtime with SetFocus.
 
K

Ken Snell

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?
 
A

Alan White

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.
 
A

Allen Browne

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.
 

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