Toggle Button not refreshing


G

Gnerks

I have a form that has 10 toggle buttons, within an option group. Each
toggle button opens a specific report, based on a unit selected via a
checkbox. For example, the code for one of the toggle buttons is:

If opgREPORTOPTIONS.Value = "1" And opgSQUADRONS.Value = "1" Then
DoCmd.RunMacro "mac1MRSAllProjects", 1

This works, brings up the report in print preview and all. However, once
the report is closed, the toggle button is still in its "depressed" state.
What I am looking for is the code necessary that when the report is closed -
the toggle button state returns to not selected or false.

From the Report_Close event, I can get back to the forms page, but just
can't figure out what will trigger the button state to not selected.
 
Ad

Advertisements

A

Arvin Meyer [MVP]

Gnerks said:
I have a form that has 10 toggle buttons, within an option group. Each
toggle button opens a specific report, based on a unit selected via a
checkbox. For example, the code for one of the toggle buttons is:

If opgREPORTOPTIONS.Value = "1" And opgSQUADRONS.Value = "1" Then
DoCmd.RunMacro "mac1MRSAllProjects", 1

This works, brings up the report in print preview and all. However, once
the report is closed, the toggle button is still in its "depressed" state.
What I am looking for is the code necessary that when the report is
closed -
the toggle button state returns to not selected or false.

From the Report_Close event, I can get back to the forms page, but just
can't figure out what will trigger the button state to not selected.


Add a line of code to the report's Close event:

Forms!NameOfCallingForm!ToggleName = False
 

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