View Full Version : Can't see report - what gives?


Johnrg
06-22-2010, 08:28 PM
I have setup a command button on a form to open and preview a report. The report runs and opens fine if clicked from the design page.

But, when I click it from the form the report runs but then minimizes to the taskbar rather than filling the screen.

I have checked the properties of this report compared to all the other reports I can run from this form and nothing seems any different.

The only thing is that it is based on queries that are not at all related to the from I am running it from. I tried puuting a command button on the switchboard but the result was the same.

Any ideas why this report seems to hide itself in the background?

Thanks

JohnG

boblarson
06-22-2010, 08:39 PM
What code is used to open the report?

Also, is there any code on any event in the reports?

Johnrg
06-22-2010, 08:49 PM
Hi Bob,
Just the standard stuff that happened in the background with the command button wizard:


Private Sub Command31_Click()
On Error GoTo Err_Command31_Click
Dim stDocName As String
stDocName = "StockTakeQueryReport"
DoCmd.OpenReport stDocName, acPreview
Exit_Command31_Click:
Exit Sub
Err_Command31_Click:
MsgBox Err.Description
Resume Exit_Command31_Click

End Sub

boblarson
06-22-2010, 09:33 PM
See what happens if you change

acPreview

to

acViewPreview

Johnrg
06-23-2010, 12:29 PM
Nope, same result.

The report is there sitting on the taskbar at the bottom of the screen but it does not / you cannot view it?

Any other ideas

JohnG

vbaInet
06-23-2010, 12:59 PM
Have you got a Docmd.Minimize code in any of the modules on the form?

Johnrg
06-23-2010, 06:31 PM
Got it going guys, was a modal pop up issue.
JG