Remotely close a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've got a 'dummy' screen that displays while ACCESS is formatting a rather long report and then displays the report and maximizes it.

What I want to do is that when the report is close I want to close the 'dummy' window as well. What I've done so far is in the Report's OnClose event I've placed the following code...

DoCmd.SelectObject acForm, "dummy"
DoCmd.Close
DoCmd.Restore

This does accomplish what I want; however, what the user sees when they close the report is a quick flash of color - which is the 'dummy' form being selected in a maximized format just prior to its closing. I'd like to eliminate this 'flashing' effect by closing the form directly without using the SelectObject command.

Is this possible?
 
Jeff,

Take a look at the Echo action. Basically, it disables
screen updates, so you might be able to do the following.
It has been a while since I used it, but I think it may be
what you want.

Docmd.echo false
DoCmd.SelectObject acForm, "dummy"
DoCmd.Close
DoCmd.Restore
Docmd.echo true

HTH
Dale
-----Original Message-----
I've got a 'dummy' screen that displays while ACCESS is
formatting a rather long report and then displays the
report and maximizes it.
What I want to do is that when the report is close I want
to close the 'dummy' window as well. What I've done so
far is in the Report's OnClose event I've placed the
following code...
DoCmd.SelectObject acForm, "dummy"
DoCmd.Close
DoCmd.Restore

This does accomplish what I want; however, what the user
sees when they close the report is a quick flash of color -
which is the 'dummy' form being selected in a maximized
format just prior to its closing. I'd like to eliminate
this 'flashing' effect by closing the form directly
without using the SelectObject command.
 
I've got a 'dummy' screen that displays while ACCESS is formatting a rather long report and then displays the report and maximizes it.

What I want to do is that when the report is close I want to close the 'dummy' window as well. What I've done so far is in the Report's OnClose event I've placed the following code...

DoCmd.SelectObject acForm, "dummy"
DoCmd.Close
DoCmd.Restore

This does accomplish what I want; however, what the user sees when they close the report is a quick flash of color - which is the 'dummy' form being selected in a maximized format just prior to its closing. I'd like to eliminate this 'flashing' effect by closing the form directly without using the SelectObject command.

Is this possible?

No need to Select the form before closing it. Just use:

DoCmd.Close acForm, "Dummy"
DoCmd.Restore
 
Back
Top