"Michael König" <br******@gmx.net> wrote in message
news:d7**********@online.de...
Hello,
I'm developping a new application (btw: I'm not a real specialist but more
or less a newbie). Now I have the following problem:
Each time I leave the main form of the application Access shows the tables
collection in the database window (I don't know why). How can I force
Access to show the forms collection in the database window without
selecting it manually. I'd prefer to select the forms when the main
applicatiion form is closed. Later on (when the application seems to be
finished) the database window will be hidden, but in the development phase
I want to see the database window.
Thank you for your kind assistance
Michael
Create a new module and paste in the following:
' Code Start
Option Compare Database
Option Explicit
Public Function DoStartup() As Boolean
On Error GoTo Err_Handler
DoCmd.RunCommand acCmdAppMaximize
DoCmd.SelectObject acForm, , True
DoStartup = True
Exit_Handler:
Exit Function
Err_Handler:
MsgBox Err.Description, vbExclamation, "Error No: " & Err.Number
Resume Exit_Handler
End Function
' Code End
Then compile the code and save it as modStartup. Then create a new macro
named AutoExec which should have a single step with action RunCode the
function name should be DoStartup() Then whenever you start the application
the forms tab is selected.