471,579 Members | 1,580 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,579 software developers and data experts.

Selected controls on a form in design mode with VBA

I would like to know the way to determine witch controls are selected
in a multi-selection on a form in design mode with VBA.

Jan 16 '06 #1
6 3351
I don't know how to do that, but maybe there's something else that would
solve your problem.

In design view, with the Formatting(form/report) toolbar visible, you can
select a specific control from a combo box that is on the left side of the
screen. If you select one control that you want and then hold down your
shift key, you can get another one using the same method until you have
selected all the controls you need to do whatever.

Linda

"nbeaubien" <ni**************@gmail.com> wrote in message
news:11**********************@g43g2000cwa.googlegr oups.com...
I would like to know the way to determine witch controls are selected
in a multi-selection on a form in design mode with VBA.

Jan 16 '06 #2
"nbeaubien" <ni**************@gmail.com> wrote in
news:11**********************@g43g2000cwa.googlegr oups.com:
I would like to know the way to determine witch controls are
selected in a multi-selection on a form in design mode with VBA.


Why in the world would anyone *ever* need to do such a thing?

Seriously?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 17 '06 #3
Control Wizard ?

--

Terry Kreft
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn**********************************@127.0.0. 1...
"nbeaubien" <ni**************@gmail.com> wrote in
news:11**********************@g43g2000cwa.googlegr oups.com:
I would like to know the way to determine witch controls are
selected in a multi-selection on a form in design mode with VBA.


Why in the world would anyone *ever* need to do such a thing?

Seriously?

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jan 17 '06 #4
"Terry Kreft" <te*********@mps.co.uk> wrote in
news:F_********************@karoo.co.uk:
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn**********************************@127.0.0. 1...
"nbeaubien" <ni**************@gmail.com> wrote in
news:11**********************@g43g2000cwa.googlegr oups.com:
> I would like to know the way to determine witch controls are
> selected in a multi-selection on a form in design mode with
> VBA.


Why in the world would anyone *ever* need to do such a thing?

Seriously?


Control Wizard ?


When would a control wizard not already know what it has selected?

This would only be valuable for interacting with a human being, and
I just wouldn't expect Access to provide very good support for that.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/
Jan 17 '06 #5
I meant the sort which appears in the Builder dialog.
--

Terry Kreft
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn**********************************@127.0.0. 1...
"Terry Kreft" <te*********@mps.co.uk> wrote in
news:F_********************@karoo.co.uk:
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn**********************************@127.0.0. 1...
"nbeaubien" <ni**************@gmail.com> wrote in
news:11**********************@g43g2000cwa.googlegr oups.com:

> I would like to know the way to determine witch controls are
> selected in a multi-selection on a form in design mode with
> VBA.

Why in the world would anyone *ever* need to do such a thing?

Seriously?


Control Wizard ?


When would a control wizard not already know what it has selected?

This would only be valuable for interacting with a human being, and
I just wouldn't expect Access to provide very good support for that.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/

Jan 17 '06 #6
David W. Fenton wrote:
"Terry Kreft" <te*********@mps.co.uk> wrote in
news:F_********************@karoo.co.uk:
"David W. Fenton" <XX*******@dfenton.com.invalid> wrote in message
news:Xn**********************************@127.0.0. 1...
"nbeaubien" <ni**************@gmail.com> wrote in
news:11**********************@g43g2000cwa.googlegr oups.com:

> I would like to know the way to determine witch controls are
> selected in a multi-selection on a form in design mode with
> VBA.

Why in the world would anyone *ever* need to do such a thing?

Seriously?


Control Wizard ?


When would a control wizard not already know what it has selected?

This would only be valuable for interacting with a human being, and
I just wouldn't expect Access to provide very good support for that.

If you write a little function and use it as a custom tool
bar button's action, then you can select the controls you
want to operate on and click the tool bar button to mass
edit the selected control's properties (Font, Width, etc).
Or, for more one off situations, just call the function from
the immediate window.

The code is pretty straightforward:

For Each ctl In Me
If ctl.InSelection Then
ctl.Width = 720
ctl.SpecialEffect = 3
. . .
End If
Next ctl
--
Marsh
Jan 22 '06 #7

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

15 posts views Thread by Arpan | last post: by
reply views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
1 post views Thread by lumer26 | last post: by
reply views Thread by lumer26 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.