Change the Access Database Window Background

AID: 5255
  • Status: Published

1830 points

  • Byconagraman
  • TypeGeneral
  • Posted on2011-04-13 at 11:05:04
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:
http://www.mvps.org/access/api/api0035.htm
http://www.lebans.com/changemdibackground.htm

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:

DoCmd.OpenForm "FirstFormName"
                                    
1:

Select allOpen in new window



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 
                                    
1:

Select allOpen in new window

   
 
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"
                                    
1:

Select allOpen in new window



While changing the background form's ribbon with the above code you can also change the background form's color or picture.

Forms![frmBackground].Detail.BackColor= vbblack
Forms![frmBackground].Picture = "c:\pic.jpg"
                                    
1:
2:

Select allOpen in new window



•    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 :)  
 

 
 

    Comments

    Add your Comment

    Please Sign up or Log in to comment on this article.

    Join Experts Exchange Today

    Gain Access to all our Tech Resources

    Get personalized answers

    Ask unlimited questions

    Access Proven Solutions

    Search 3.2 million solutions

    Read In-Depth How-To Guides

    1000+ articles, demos, & tips

    Watch Step by Step Tutorials

    Learn direct from top tech pros

    And Much More!

    Your complete tech resource

    See Plans and Pricing

    30-day free trial. Register in 60 seconds.

    Loading Advertisement...

    Top MS Access Experts

    1. mbizup

      784,072

      Sage

      4,520 points yesterday

      Profile
      Rank: Genius
    2. capricorn1

      766,094

      Sage

      10,500 points yesterday

      Profile
      Rank: Savant
    3. boag2000

      656,789

      Sage

      6,500 points yesterday

      Profile
      Rank: Genius
    4. LSMConsulting

      447,337

      Wizard

      1,000 points yesterday

      Profile
      Rank: Savant
    5. fyed

      441,791

      Wizard

      1,510 points yesterday

      Profile
      Rank: Genius
    6. DatabaseMX

      341,349

      Wizard

      1,500 points yesterday

      Profile
      Rank: Savant
    7. JDettman

      274,883

      Guru

      2,510 points yesterday

      Profile
      Rank: Genius
    8. peter57r

      259,954

      Guru

      0 points yesterday

      Profile
      Rank: Savant
    9. als315

      222,728

      Guru

      6,000 points yesterday

      Profile
      Rank: Genius
    10. matthewspatrick

      157,448

      Guru

      3,610 points yesterday

      Profile
      Rank: Savant
    11. Helen_Feddema

      125,149

      Master

      0 points yesterday

      Profile
      Rank: Genius
    12. imnorie

      118,132

      Master

      600 points yesterday

      Profile
      Rank: Genius
    13. danishani

      106,613

      Master

      0 points yesterday

      Profile
      Rank: Wizard
    14. cactus_data

      85,952

      Master

      1,200 points yesterday

      Profile
      Rank: Genius
    15. TheHiTechCoach

      80,124

      Master

      0 points yesterday

      Profile
      Rank: Sage
    16. dqmq

      77,066

      Master

      1,500 points yesterday

      Profile
      Rank: Genius
    17. harfang

      74,385

      Master

      50 points yesterday

      Profile
      Rank: Genius
    18. Nick67

      59,053

      Master

      0 points yesterday

      Profile
      Rank: Sage
    19. Sudonim

      49,486

      0 points yesterday

      Profile
      Rank: Wizard
    20. pteranodon72

      45,520

      2,000 points yesterday

      Profile
      Rank: Wizard
    21. aikimark

      43,748

      2,000 points yesterday

      Profile
      Rank: Genius
    22. IrogSinta

      37,564

      1,500 points yesterday

      Profile
    23. TechMommy

      35,330

      70 points yesterday

      Profile
      Rank: Master
    24. BillDenver

      31,954

      0 points yesterday

      Profile
      Rank: Guru
    25. hnasr

      31,316

      0 points yesterday

      Profile
      Rank: Genius

    Hall Of Fame