Opening Switchboard

M

Matt D

I have a new database I created and created the switchboard. Is there anyway
to set it so that when open the database only the switchboard form comes up.
Right now when I open the database the access program comes up and the
swithcboard opens like it is supposed to but in a smaller window inide the
access program window. Just looks bad and would like to clean up the
appearance of this. Will be building on it over time and would like to have
others using it.

Thanks for any help.
 
C

CJR

Matt

I have used something like this in the past to hide the Access application
window:

In the declarations section of the Switchboard form module:

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal
nCmdShow As Long) As Long
Dim hAcc As Long

In the form_load and form_close procedures:

Private Sub Form_Close()
Dim rc As Integer
hAcc = Application.hWndAccessApp
'3 -> Show Maximized
rc = ShowWindow(hAcc, 3)
Application.Quit
End Sub

Private Sub Form_Load()
Dim rc As Integer
hAcc = Application.hWndAccessApp
'0 -> Hide
rc = ShowWindow(hAcc, 0)
hAcc = Me.hwnd
'1 -> Show Normal
rc = ShowWindow(hAcc, 1)
End Sub

Hope this helps.

Chris
 
M

Matt D

I'll give that a try...thanks for the help.

CJR said:
Matt

I have used something like this in the past to hide the Access application
window:

In the declarations section of the Switchboard form module:

Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, ByVal
nCmdShow As Long) As Long
Dim hAcc As Long

In the form_load and form_close procedures:

Private Sub Form_Close()
Dim rc As Integer
hAcc = Application.hWndAccessApp
'3 -> Show Maximized
rc = ShowWindow(hAcc, 3)
Application.Quit
End Sub

Private Sub Form_Load()
Dim rc As Integer
hAcc = Application.hWndAccessApp
'0 -> Hide
rc = ShowWindow(hAcc, 0)
hAcc = Me.hwnd
'1 -> Show Normal
rc = ShowWindow(hAcc, 1)
End Sub

Hope this helps.

Chris
 
Top