Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2014
    Posts
    22
    Provided Answers: 1

    Unanswered: Hide Application Window When Viewing Report in Print Preview

    I have code, set up in a module, hiding the application window while viewing a form.
    Here is the code:
    Function fSetAccessWindow(nCmdShow As Long)

    Dim loX As Long
    Dim loForm As Form
    On Error Resume Next
    Set loForm = Screen.ActiveForm

    If Err <> 0 Then
    loX = apiShowWindow(hWndAccessApp, nCmdShow)
    Err.Clear
    End If

    If nCmdShow = SW_SHOWMINIMIZED And loForm.Modal = True Then
    MsgBox "Cannot minimize Access with " _
    & (loForm.Caption + " ") _
    & "form on screen"
    ElseIf nCmdShow = SW_HIDE And loForm.PopUp <> True Then
    MsgBox "Cannot hide Access with " _
    & (loForm.Caption + " ") _
    & "form on screen"
    Else
    loX = apiShowWindow(hWndAccessApp, nCmdShow)
    End If
    fSetAccessWindow = (loX <> 0)
    End Function

    Can I use it for a report?

  2. #2
    Join Date
    Nov 2004
    Location
    out on a limb
    Posts
    13,692
    Provided Answers: 59
    I dunno, why not try it out and report back
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Nov 2014
    Posts
    22
    Provided Answers: 1
    I'm really afraid I am going to screw something up. I am a real novice.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •