need help with DoCmd.OpenReport stDocName, acViewPreview, , strWh

T

Ted

am using a2k.

i have a form which is launched from the Switchboard which has a 'Preview
Report' buton on it whose OnClick event has the above command embedded in its
VBA code.

i didn't like the fact that when the Switchboard opened there was a
'restore' button in the upr right hnd corner and read something in this group
to the effect that setting the Popup property to 'Yes' would turn it off (i
added a docmd.maximize command to the on open event of the board's) and it
looked 'better'.

but what i found afterwards is that when the user clicks the 'Preview
Report' button of the form i referred to above, the report fails to display.

i'm just guessing but i figure that if there were a way to override the
popup property of the switchboard just before the command in the heading is
launched that that would let the report display and that if it did then it
would be possible to restore the popup property when the report was closed
thereby getting the same effect.

does my theory hold any H20?

-ted
 
F

fredg

am using a2k.

i have a form which is launched from the Switchboard which has a 'Preview
Report' buton on it whose OnClick event has the above command embedded in its
VBA code.

i didn't like the fact that when the Switchboard opened there was a
'restore' button in the upr right hnd corner and read something in this group
to the effect that setting the Popup property to 'Yes' would turn it off (i
added a docmd.maximize command to the on open event of the board's) and it
looked 'better'.

but what i found afterwards is that when the user clicks the 'Preview
Report' button of the form i referred to above, the report fails to display.

i'm just guessing but i figure that if there were a way to override the
popup property of the switchboard just before the command in the heading is
launched that that would let the report display and that if it did then it
would be possible to restore the popup property when the report was closed
thereby getting the same effect.

does my theory hold any H20?

-ted

it probably is displaying, but because you have the switchboard set to
Pop-Up it's hidden behind the switchboard.

If you wish to keep the switchboard as pop-up, add a line of code to
each command button event (or if you are using the switchboard created
by the Built-in switchboard manager add the line just before the
HandleButtonClick_Exit: line of the
Private Function HandleButtonClick() function:

Me.Visible False

Then code the Close event of any form or report opened by the
switchboard:
Forms!SwitchBoardName.Visible = True
 
T

Ted

hi fredg,

sounds plausible to yours truly. you got the gold star already and i haven't
even tried it out :) will do so when i gets back to the office tomorrow am.
looking forward to seeing this work like i envisaged!

with best regards,

-ted
 
T

Ted

hey fredg,

yes, the SB was generated using the SB wizard so plonked the Me.Visible =
False line where you wrote. i didn't get 'round to locating the venues for
the other code and just wanted to see the behavior when the above....i find
that it has the effect of disappearing the SB and taking the user to the
objects window. this was not what i would've wanted to happen but i want to
rule out the chance i'm doing something wrong?

-ted
 

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