By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,322 Members | 1,904 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,322 IT Pros & Developers. It's quick & easy.

Open reports with a hidden MS Access application window

P: n/a
I have an Access 2000 application and I am using ShowWindow to hide the
MS Access application window. Works fine as long as there is a popup
form open all the time. The problem is when I want to open a report.
Reports seem to only be able to to open within the Access Window itself
(or am I missing something?)
To work around this I use a scheme that opens the report maximized,
then unhides and maximizes the MS Access window using

dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)

then hides the access window again when the report is closed.

Is there another (better) way of doing this?


Private Declare Function IsWindowVisible Lib "user32" (ByVal hwnd As
Long) As Long
Dim dwReturn As Long

Const SW_HIDE = 0

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long,
ByVal nCmdShow As Long) As Long

Function MaximizeApplicationWindow()
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End Function

Function HideApplicationWindow()
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End Function


Nov 13 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.