fAccessWindow 제공합니다 ("숨기기", 거짓, 거짓) 실제 액세스 창을 숨기는 기능은 내가 공백없이 시도 컴파일 오류 번호 7960fAccessWindow ("숨기기", 거짓, 거짓이) 컴파일 오류를
"fAccessWindow를 ("제공 Hide ", False, False)"하지만 차이는 없습니다. 나는 또한 here 찾을 수있는 모듈 아래 코드가 있습니다. 가장 낮은 수준의 매크로 보안으로 Access 2010을 사용하고 있습니다. 또한 내 운영 체제는 x64입니다.
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
첫째, 당신은 컴파일 오류의 원인이 말하는 코드를 표시하지 않는 : 당신이해야 할 경우 나에게 분명하지 않다 :
를하거나 할 필요가있는 경우 호출되는 코드를 보여 주지만 오류를 생성하는 코드는 호출하지 않습니다.); 둘째, 실제 오류 메시지가 표시되지 않습니다. 사람들이 당신을 도울 수 있도록 그 세부 사항을 제공하십시오. –
"이 함수를 컴파일하는 중 오류가 발생했습니다"매크로 이름, 작업 이름 "RunCode", 인수 "fAccessWindow ("숨김, 거짓, 거짓) "오류 번호"7960 " –