Hello, im trying to make my form open directly when i open my access file.accdb. When i double click on my .accdb can it be done to open directly and only my form. I found a way to open my form but it opens the access program in the background.
Not sure if this is what you are looking for, but I use it for users of my db that I do not want them to see the tool bar or navigation pane. Of course, you will have to have a way of "unhiding" both of them.
Code:
'Hides the navigation pane for users who get this as the startup screen
DoCmd.NavigateTo "acNavigationCategoryObjectType"
DoCmd.RunCommand acCmdWindowHide
'hide the tool bar too
DoCmd.ShowToolbar "Ribbon", acToolbarNo
I am not sure exactly what you mean or why you want this, but if you set the form to be opened on start of the Access program, then it will be the only thing that appears. Go to Options, Current Db, set the display form as the form you want to open. Then with the code I gave you, it will open and no other forms will be displayed.
If this is not what you want, then it is beyond my area of expertise.