I have seen a lot of questions from people around the internet about changing the ugly background of the Microsoft Access database window. : )
I’m going to explain a technique for changing the appearance of the background of a database- with almost no code at all!
The only code that will be added will be an open form command.
•I should clarify that this procedure will not literally change the Access background. To do that you would need to use an API.
Two API based solutions are:
This is a technique that provides a good and simple work-around to a complex problem that produces almost the same result with nearly no code. I will let you be the judge of how it stacks up to an API approach.
The challenge to this is going to be grasping the concept. The technique is for lack of a better term “layering” the forms. The best way to think of this is it is a splash screen that does not popup and does not close. Another way to think of this technique is "framing a picture with a mat".
Now on to the steps:
- Create a new form.
- Set your desired background picture or choose a Detail back color.
- Save your new form.
Now set a few more settings in the form’s properties to make it appear correctly. In the form's properties set:
- Pop Up = No (required)
- Record Selectors = No
- Navigation Buttons = No
- Scroll Bars = No
Now we have to set a few options. Go into the Access Options. Click on the tab/option “Current Database” on the left side of the menu. In this section choose your “background” form’s name in the “Display Form” drop box.
Next while still in the “Current Database” options find where it says “Document Window Options” make sure the radio button next to “Tabbed Documents” is selected. Also un-check the box next to “Display Document Tabs”. One last option needs to be set so that this looks the way it should. In the same current database options section un-check the “Display Navigation Pane” check box.
• Note: when you close out of the access options a popup message saying to close your database so the changes can take effect will appear. (Just click ok)
• Note: un-checking the “Display Navigation Pane” hides the navigation pane. The way to un-hide the navigation pane after you have set it to not show is hold the shift key while opening your database. So close your database >>press and hold the shift key >> while holding the shift key double click on your database and once it is open let go of the shift key.
At this point if you close and open your database you will see that your new form is the new background.
If you are building this background for an existing database go into each of the existing forms and make sure they are set to POP UP = yes. (*note it is always a good idea to backup your database first before making changes)
• The only form that should not be set to popup is your background form. If you have one maximize it is ok but you will not see your fancy new background that you worked so hard for : )
If you are creating a new database and this is the first form you are making for it, keep in mind that this background form should be the only form that is set not to popup. All of your other forms should be set to POP UP = yes.
Now the code that is needed:
Now that you have your background form opening when your database starts we need to put some code in to open the first form you want your user to be able to interact with. The code needs to be put in the onLoad event or the onOpen event of your “background” form:
There you go… that’s it. I will tell you the way to make this really slick is to add a custom ribbon to your database.
If you don’t want a custom ribbon and would like to just hide the access ribbon put this code where you have the docmd.openform command
DoCmd.ShowToolbar “Ribbon”, acToolBarNo
For you advanced users who have multiple custom ribbons - the approach would be to not have a ribbon specified in each form's "ribbon name" property. Instead in the onload event of a form tell it to change the ribbon of the background form.
Forms![frmBackground].RibbonName = "RibbonName"
While changing the background form's ribbon with the above code you can also change the background form's color or picture.
Forms![frmBackground].Picture = "c:\pic.jpg"
• OK that’s it : ) For anyone not following take a look at my attached sample database for an example. I hope you enjoyed reading this and if you liked this article and or learned something please comment and mark this article as helpful :)