I found this function (MakeTopMost) over the weekend and it worked
great under XP and Access97 but does not work for more than 30 seconds
here at work under WIN2000 and Access 2000. Any help would be
appreciated:
Public Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long,
ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal
cX As Long, ByVal cY As Long, ByVal wFlags As Long) As Long
Public Const HWND_TOPMOST = -1
Public Const HWND_NOTOPMOST = -2
Public Const SWP_NOMOVE = &H2
Public Const SWP_NOSIZE = &H1
Public Function MakeTopMost(iPos As Boolean, lHWnd As Long) As Boolean
'call MakeTopMost(-1,Application.hWndAccessApp)
'call MakeTopMost(0,Application.hWndAccessApp)
Dim lWinPos As Long
Dim l As Long
Select Case iPos
Case False:
lWinPos = HWND_NOTOPMOST
Case True:
lWinPos = HWND_TOPMOST
Case Else
Exit Function
End Select
If SetWindowPos(lHWnd, lWinPos, 0, 0, 0, 0, SWP_NOMOVE _
+ SWP_NOSIZE) Then
MakeTopMost = True
End If
End Function