Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

No Print Button

Status
Not open for further replies.

Ptrif

Technical User
May 19, 2003
106
0
0
US
I use the following code to hide the access window, however when running a report the report runs just fine but there is absolutely no way to print it....is there a way to add the print menu bar to the report? any help or suggestions welcome!!

Thanks

Paul


Option Compare Database

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

Const SW_HIDE = 0
Const SW_SHOWNORMAL = 1
Const SW_SHOWMINIMIZED = 2
Const SW_SHOWMAXIMIZED = 3

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

Public Function fAccessWindow(Optional Procedure As String, Optional SwitchStatus As Boolean, Optional StatusCheck As Boolean) As Boolean
If Procedure = "Hide" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
End If
If Procedure = "Show" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
If Procedure = "Minimize" Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMINIMIZED)
End If
If SwitchStatus = True Then
If IsWindowVisible(hWndAccessApp) = 1 Then
dwReturn = ShowWindow(Application.hWndAccessApp, SW_HIDE)
Else
dwReturn = ShowWindow(Application.hWndAccessApp, SW_SHOWMAXIMIZED)
End If
End If
If StatusCheck = True Then
If IsWindowVisible(hWndAccessApp) = 0 Then
fAccessWindow = False
End If
If IsWindowVisible(hWndAccessApp) = 1 Then
fAccessWindow = True
End If
End If
End Function

 
Hi,
Create a shortcut menu and use it for the report.
Or you have to enable View Access Window at the time you are viewing a report and disable it as soon as you close report.
By the way, on which platform you are using this code ? XP or Windows 2000 ? I am facing problem with XP not with 2000
regards


Zameer Abdulla
 
Thanks Zameer, I am using XP. How do you go about creating a shortcut menu for a report?

Thanks again for your help!

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top