Re: Make an array of toggle buttons
am 01.04.2008 17:52:47 von Allen Browne
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" wrote in message
news:qrn4v3pq2har7nshkhe11couivng97aob8@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
Make an array of toggle buttons
am 01.04.2008 18:27:42 von Chuck
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
Re: Make an array of toggle buttons
am 02.04.2008 14:30:07 von Chuck
On Tue, 1 Apr 2008 23:52:47 +0800, "Allen Browne"
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