Hi Rich,
I think this might be what you're after. I cannot claim credit for this as I got the source from somewhere off the net a while ago. Follow these steps and see if it does the trick. Oh and by the way, I suggest doing this on a backup copy of your database
Step 1:
Create a module in your database called 'Hide or Show Access Window'
In this module insert the following code:
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
Step 2:
Create an Autoexec macro that has the following actions:
Runcode fAccessWindow ("Hide",False, False)
OpenForm "open your initial form or switchboard"
Step 3:
Finally change the Popup property on all the forms you wish to display to YES.
To try it out, close your database and open it again. This should give you just the form that you selected in your Autoexec macro. You will not see any of the Access environment. This is unless the user presses the shift key when launching the database, as mentioned earlier in this post.
Hope this helps
Keith