Toggle Button Reset

A

Asif

Is it possible to reset the toggle button by pressing another command
button i.e. press Button1 and the toggle button restores to its
original state i.e. not depressed?

Thanks
 
A

Allen Browne

Yes. The other button sets the toggle to False, e.g.:

Me.[Toggle2].Value = False
 
A

Asif

Yes. The other button sets the toggle to False, e.g.:

Me.[Toggle2].Value = False

--
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.




Is it possible to reset the toggle button by pressing another command
button i.e. press Button1 and the toggle button restores to its
original state i.e. not depressed?
Thanks- Hide quoted text -

- Show quoted text -

On the other hand is it possible to achieve the same thing but with
two toggle buttons i.e press Toggle2 and Toggle1 returns to its
original state likewise press Toggle1 and Toggle2 returns to its
original state?
 
A

Allen Browne

Sure. Put them in an Option Group.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Asif said:
Yes. The other button sets the toggle to False, e.g.:

Me.[Toggle2].Value = False




Is it possible to reset the toggle button by pressing another command
button i.e. press Button1 and the toggle button restores to its
original state i.e. not depressed?
Thanks- Hide quoted text -

- Show quoted text -

On the other hand is it possible to achieve the same thing but with
two toggle buttons i.e press Toggle2 and Toggle1 returns to its
original state likewise press Toggle1 and Toggle2 returns to its
original state?
 
H

Harry

I have the same done by placing the buttons in a option group. The toggle
works fine. However....
After pressing a button for me a new form is opened and the "orginal" form
remains active. Closing the requested form I see that the togglebutton is
still showed as being pressed and cannot be pressed again unless I press
first another togglebutton.
Is there a way that the button gets "de-activated" after pressing it?
ofcours it should be possible to press it again without to close/start the
"buttonform".

Kind regards,
Harry

Allen Browne said:
Sure. Put them in an Option Group.

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Asif said:
Yes. The other button sets the toggle to False, e.g.:

Me.[Toggle2].Value = False





Is it possible to reset the toggle button by pressing another command
button i.e. press Button1 and the toggle button restores to its
original state i.e. not depressed?

Thanks- Hide quoted text -

- Show quoted text -

On the other hand is it possible to achieve the same thing but with
two toggle buttons i.e press Toggle2 and Toggle1 returns to its
original state likewise press Toggle1 and Toggle2 returns to its
original state?
 
A

Asif

I have the same done by placing the buttons in a option group. The toggle
works fine. However....
After pressing a button for me a new form is opened and the "orginal" form
remains active. Closing the requested form I see that the togglebutton is
still showed as being pressed and cannot be pressed again unless I press
first another togglebutton.
Is there a way that the button gets "de-activated" after pressing it?
ofcours it should be possible to press it again without to close/start the
"buttonform".

Kind regards,
Harry


I was having a similar problem as mentioned above and what i did was
to add the following code in the mouse down event

Me.[Toggle1].Value = False

i.e. add the above code to Toggle2 in the mouse down event so that
when the user clicks on toggle2 then toggle1 returns to its original
state

hope that helps

Asif
 
H

Harry

Hi Asif,

Just after posting my responce I found out the solution I needed.
As always it is more simple as you've expected.

I have placed the toggle buttons in a option group. Just after executing the
command fe. open form bla bla I have placed the command
Me!OptionGroupControlName = Nul
This results in a reset of the togglebuttons.
So rename the OptionGroupControlName to the name of your optiongroup and
enjoy.

Greetings Harry
Asif said:
I have the same done by placing the buttons in a option group. The toggle
works fine. However....
After pressing a button for me a new form is opened and the "orginal" form
remains active. Closing the requested form I see that the togglebutton is
still showed as being pressed and cannot be pressed again unless I press
first another togglebutton.
Is there a way that the button gets "de-activated" after pressing it?
ofcours it should be possible to press it again without to close/start the
"buttonform".

Kind regards,
Harry


I was having a similar problem as mentioned above and what i did was
to add the following code in the mouse down event

Me.[Toggle1].Value = False

i.e. add the above code to Toggle2 in the mouse down event so that
when the user clicks on toggle2 then toggle1 returns to its original
state

hope that helps

Asif
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top