Aşağıda modülde yazılı kodları dosyama adapte edemedim. Bu kodların işimi göreceğini umut ediyorum.
kullanıcı : ADMIN
parola : 171717
Kod:
Option Compare Database
Option Explicit
Global Const SW_HIDE = 0
Global Const SW_SHOWNORMAL = 1
Global Const tr = 2
Global Const SW_SHOWMAXIMIZED = 3
Private Declare PtrSafe Function apiShowWindow Lib "user32" _
Alias "ShowWindow" (ByVal hwnd As Long, _
ByVal nCmdShow As LongPtr) As Long
'Private Declare Function apiShowWindow Lib "user32" _
'Alias "ShowWindow" (ByVal hwnd As Long, _
'ByVal nCmdShow As Long) As Long
Function gizle(nCmdShow As Long)
Dim loX As Long
Dim loForm As Form
On Error Resume Next
Set loForm = Screen.ActiveForm
If Err <> 0 Then
If nCmdShow = SW_HIDE Then
MsgBox "deneme" _
& "a form is on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
Err.Clear
End If
Else
If nCmdShow = tr And loForm.Modal = True Then
MsgBox "deneme" _
& (loForm.Caption + " ") _
& "form on screen"
ElseIf nCmdShow = SW_HIDE And loForm.PopUp <> True Then
MsgBox "deneme" _
& (loForm.Caption + " ") _
& "form on screen"
Else
loX = apiShowWindow(hWndAccessApp, nCmdShow)
End If
End If
gizle = (loX <> 0)
End Function