Hidden access window pops open when followhyperlink (1 Viewer)

nabiki

Registered User.
Local time
Today, 02:26
Joined
Dec 10, 2012
Messages
10
I am ready to release my database to the staff (my FIRST !) and i have been able to hide the main window in this way....
I have Module1 (code is below) and I use a macro called mcrHide which is in the OnLoad event for the form....this works fine until someone clicks on the URL in the form which has an onclick event procedure -

Private Sub URL_Click()
HyperlinkAddress = Me.URL
FollowHyperlink HyperlinkAddress
End Sub


As soon as someone clicks this it opens the website but also opens the access or the runtime window.
Any tips on how i can get around this ?

MODULE 1

Option Compare Database
Option Explicit
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
''''''''''''
' End Code '
''''''''''''
 

LittleE

New member
Local time
Today, 02:26
Joined
Aug 7, 2015
Messages
7
Have you had any luck with this issue? I am experiencing exactly the same problem...
 

nabiki

Registered User.
Local time
Today, 02:26
Joined
Dec 10, 2012
Messages
10
No luck so far! Im back here still trying months later !
 

nabiki

Registered User.
Local time
Today, 02:26
Joined
Dec 10, 2012
Messages
10
So - I have worked out so far that if I use faccesswindow to HIDe rather than minimise the this problem goes away.
 

nabiki

Registered User.
Local time
Today, 02:26
Joined
Dec 10, 2012
Messages
10
However this means there is no more icon in the taskbar and that sux.
 

nabiki

Registered User.
Local time
Today, 02:26
Joined
Dec 10, 2012
Messages
10
And considering I also have the problem of the access window popping back up when users click on the taskbar as well as when they click on hyperlink I f I can figure out how to get an ion in the taskbar for the form and hide access altogether I will be winning.
 

LuisOD

New member
Local time
Today, 05:26
Joined
Sep 5, 2017
Messages
1
I use the FollowHyperlink method to open an external database with the main window hidden too, and got the same problem. I got this around by setting the third parameter in the method like this

FollowHyperlink Mydatabase,,True
 

Users who are viewing this thread

Top Bottom