473,804 Members | 3,038 Online
Bytes | Software Development & Data Engineering Community
+ 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 5263
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*****@school link.netwrote in message
news:qr******** *************** *********@4ax.c om...
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*********@Se eSig.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
5081
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 , ot the left are 2 columns of clickable icons, Pointer, PictureBox, Label, Textbox, etc Which of these do I use to make an ON or ENABLE sending data bits and a STOP, or Disable data bits. thanks
0
2290
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 below). I have set the button's "Triple State" value to Yes, and the default value to False. Here is the macro that I used for tglName (I assigned the macro to the button's On Click event): ...
11
4817
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 to hit - they don't work at all. Its true. I created 'em with the built-in wizard furnished with Access 97 but they do not work. I put 12 of 'em in the group, labeled the months of the year and giving
4
4353
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 first button confirms that the goods are now in our building awaiting initial processing. This button then fires off an email to our warehouse staff alerting them to the fact. I want to restrict these buttons to single use, so that once the email...
2
7973
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 other toggle button will push down and the "pushed down button" will push up. I have trying to find groupID for toolstrip button, but seem like they don't have it. I hope anyone can help my question, thank you very much.
5
3356
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 any particular table or field in the database, but will be used in code later to build queries. I have tried putting a bunch of radio/option buttons in a frame, and also tried putting a bunch of toggle buttons on the form, and run into the same...
3
3838
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 down position at design time? (All controls are unbound). I have done some searching on TheScripts, and found a couple of cases where it was suggested to set the Down position, which is where I picked up the terminology. But couldn't seem to find...
2
2875
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, my Retail prices. Can someone please show me the syntax for this? I've dug thru the help, but it doesn't appear to be very relevant for me. My Form already has 'access' to the prices necessary thru my query...
2
6952
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 come across a way to set the listbox value to only 1 at a time, but need multiple toggle buttons to be on their corresponding listbox item values to be selected. Thanks!
0
9579
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10326
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10317
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10075
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9143
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5520
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4295
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2990
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.