473,461 Members | 1,697 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Make an array of toggle buttons

How can I make an array of command buttons (or toggle buttons) on a form and
have a text box on the same form display the index of the button clicked? This
works very well in VB6, but I can't duplicate the action in Access.

Chuck
Apr 1 '08 #1
2 5240
Create an option group.
Put toggle buttons in the group.
Then examine the Value of the group to see which one is depressed.
(It will match the OptionValue property of the button in the group.)

Another alternative might be to use a tab control, with the Style set to
Buttons.

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Chuck" <li*****@schoollink.netwrote in message
news:qr********************************@4ax.com...
How can I make an array of command buttons (or toggle buttons) on a form
and
have a text box on the same form display the index of the button clicked?
This
works very well in VB6, but I can't duplicate the action in Access.

Chuck
Apr 1 '08 #2
On Tue, 1 Apr 2008 23:52:47 +0800, "Allen Browne" <Al*********@SeeSig.Invalid>
wrote:
>Create an option group.
Put toggle buttons in the group.
Then examine the Value of the group to see which one is depressed.
(It will match the OptionValue property of the button in the group.)

Another alternative might be to use a tab control, with the Style set to
Buttons.
Thanks for your help.

Option group worked perfectly. I don't know how many times I had tried to make
an option group before, but each time I had tried to make the toggle buttons be
an array ( Toggle1(0), Toggle1(1) etc.). I had defined the array in the form
module, but apparently not correctly, then set Text1 = Index and Text1=
OptionValue. No luck. I had been to your web site earlier today, but couldn't
find what I was looking for.

Chuck
Apr 2 '08 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: EN | last post by:
Hi, I want to put a bmp of a toggle switch leaning to the left, the off position. With a painter prgm, flip the left toggle , lean right, for ON or Start position. How do I do this? With VB 6 ,...
0
by: Aravind | last post by:
Hi folks. I have a form, frmHistory, which has 3 toggle buttons (1 of which is tglName, which I will be using to demonstrate my problem). The buttons are used to sort the form (explanations...
11
by: MLH | last post by:
Why is that? If I choose the tiny check boxes which are hard to hit with a mouse, it works fine. But option buttions, shich can be sized big enough for people with limited sight and dexterity...
4
by: Neil Coleclough | last post by:
I am constructing a database to process product returns for my Company. I have a number of toggle buttons to identify the stage to which each return has been processed. For example, clicking the...
2
by: Mel | last post by:
Hi, is there any way I can implement toolstrip toggle button simular to the MS Word alignment button? if one toggle button already pressed down, if user click on the "pushed down button", the...
5
by: Killer42 | last post by:
Hi all. I'm coming from a VB6 background so this is just confusing me a little. I have a form where the user can select one of a number of years to search. The selection doesn't relate directly to...
3
by: Killer42 | last post by:
Hi all. I have a frame with some toggle buttons in it. All is working fine, except that the user can't tell which option is selected to begin with. How do I set one of the toggle buttons to the...
2
stonward
by: stonward | last post by:
Hiya People, I've put two toggle buttons in a frame...so only one can be 'active' at any one time. When one is 'live' (option 1, say) I want the Form to show my Trade price values, when the other,...
2
by: 6afraidbecause789 | last post by:
Hi - Has anyone ever used toggle buttons to select items in a listbox? I'd like to put about 24 toggle buttons on an unbound form that select or deselect items in a multiple select listbox. I've...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.