473,391 Members | 1,617 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,391 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 3453
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: BlueInGreen | last post by:
How can I put a listbox, combobox... on a form, using VBA code? Thx
16
by: TD | last post by:
This is the code under a command button - Dim ctl As Control For Each ctl In Me.Controls If ctl.BackColor <> RGB(255, 255, 255) Then ctl.BackColor = RGB(255, 255, 255) End If Next ctl
0
by: Frnak McKenney | last post by:
I'm running into problems with VisualStudio.NET2003 and Windows Forms inheritance. It _feels_ like a bug, but it could just as well be a misunderstanding on my part regarding how the VS Designer...
3
by: Wayne | last post by:
1. I have created my own class that inherits the textbox (called it CyanFocusTextBox). I put in some code and some new properties. All this works. I build the dll that contains this class...
14
by: Jan Nielsen | last post by:
Hi In Microsoft Access it is possible to write code like this Sub test() DoCmd.OpenForm "TestForm", acDesign Dim a As Control For Each a In Forms("TestForm").Controls Do stuff Next End Sub
11
by: Crirus | last post by:
I need to derive the Windows.Forms.Control 2 times so I design a class like this Public Class BMControl Inherits System.Windows.Forms.UserControl Public Class MapControl Inherits BMControl
4
by: Michael | last post by:
Hi Everyone, I need to write a utility for an app that will get the list of controls on the form. I would also need to get the info on how the parent is, ect... What is the best way to go about...
1
by: gjohncock | last post by:
I am working on a project that requires me to be able to enumerate through all the controls that may be selected (ie: showing their selection handles) in a forms design view window. I have managed...
15
by: Arpan | last post by:
Consider the following code which retrieves data from a SQL Server 2005 DB table & displays it in a DataGrid: <script runat="server"> Sub Page_Load(ByVal obj As Object, ByVal ea As EventArgs)...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.