4

I was wondering if there was any way of changing the background in access. The standard grey is ok but I would like to change it to an image that shows instructions or what was updated last. Also, if I can allow a user to change the background to an image of their choice that would be cool as well.

Can this be done

Fionnuala
  • 90,370
  • 7
  • 114
  • 152
Dan Thomas
  • 285
  • 1
  • 2
  • 16
  • 3
    Couple of potential solutions for you - see http://www.lebans.com/changemdibackground.htm or http://access.mvps.org/access/api/api0035.htm – dash Apr 03 '12 at 13:29
  • 1
    Could you clarify if you are referring to a form you created (or other object type) or the background behind all these (visible when windows are not maximized). I know that you can change the former but not sure for the latter. – ericosg Apr 03 '12 at 13:31
  • Actually I would like it to be in the database window that first opens up when you open the database. – Dan Thomas Apr 03 '12 at 13:33
  • I strongly suggest you do not add a picture background. It will make load times unpleasant. – Fionnuala Apr 03 '12 at 13:34
  • You can create a start-up form. – Fionnuala Apr 03 '12 at 13:34
  • I don't think it would affect load times to much. If so, maybe a few extra seconds. That is a small price to pay. Besides all of the users that use the database connect to it locally. If they were connecting to it remotely I could see how there could be a performance issue. However, that is not the case. – Dan Thomas Apr 03 '12 at 13:43

3 Answers3

4

To be honest, I'm not sure if this is possible or not, but if it is, I'd advise you not to do it. Why?

  1. Users will expect instructions under a help menu or on an intro splash form
  2. They will expect info. like what was updated last to appear in more conventional places like the status bar
  3. Allowing users to personalise your application with their photos can make your application look pretty bad and increase load times.

Only advice though - good luck with it!

Galwegian
  • 41,475
  • 16
  • 112
  • 158
  • Although I've posted links to two potential solutions, I agree with this advice wholeheartedly - +1 – dash Apr 03 '12 at 13:38
  • 1
    I primarily want to do it for instruction purposes. To inform the user and company of any critical changes that were made tot he database. By adding that information to the background they would see it for sure. The only reason i asked about allowing the users to do it is I am guessing they may ask once they see I can control the background. – Dan Thomas Apr 03 '12 at 13:40
  • +1 from me, too. I have tried decorative backgrounds in the past and would not do so again. – Fionnuala Apr 03 '12 at 13:59
  • @DanThomas - I understand your idea, but this would be a sub-optimal solution - there are simply better, more intuitive ways to display the type of information you want. A good rule of thumb is if you ask yourself "What other successful applications are presenting this type of information in this way?". Good luck! – Galwegian Apr 03 '12 at 14:16
  • I was thinking that it would be a simple question to answer. Maybe the fact that it is not answered easily shows that it is not used by very many people if any. I thought it would be a cool and easy way to communicate with the users of the database without having to use a form in autostart. – Dan Thomas Apr 03 '12 at 14:39
2

I have been able to allow users to change the background of the database. It works great and it works no matter what computer they log onto the database from. I did have a problem with remote users so I added a macro that allows them to disable the functionality. It works great. It was a little complicated to se up initially. Some of the modules below may have more stuff contained in them then what is needed for the purpose of this question. But here is what I did to make it work:

Add the Following modules to your database: modChangeMDI, SetBackgroundImage, and clsCommonDialog

Link to a zip file containing the code for the above modules: http://www.filedropper.com/changebackgroundimage

You can set the default location that a users sees when the search for file dialog pops up. This is located in the ThisFileToOpen function of the SetBackgroundImage module.

clsCommonDialog <-- Used to open the find file dialog box modChangeMDI <--Used to change the background image

Create a table called $BackgroundLocation with the following fields. On my database this is contained in the backend database.

ID (AutoNumber, Primary Key)
UserID (Text, Required, 250 in length, don't allow zero lengths)
BackgroundLocation (Text, 255 in length, not required)
DisableBackground (boolean)

Create an AutoExec macro and add an action that runs the code SetTheBackgroundPictureOnStartup (1)

Create a BackgroundDisableEnable macro and add an action that runs the code DisableEnableBackground()

Create a BackgroundSet macro and add an action that runs the code SetTheBackgroundPictureOnStartup(2)

Then assign the BackgroundDisableEnable and the BackgroundSet macro to their own menu item.

When the database opens it will run the AutoExec by default.

Linger
  • 14,942
  • 23
  • 52
  • 79
  • I did download the zip file you linked and briefly looked at the code. Wow, I didn't expect it to be that involved. I did notice that you are doing everything I was asking for and then some. I am a little apprehensive after seeing the comments above. I will give it a try though on a practice database. Thanks for taking the time to respond. – Dan Thomas Apr 03 '12 at 14:42
  • Ok, so I tried it and it worked with out me having to do anything else. I was afraid that I would have to play with it to get it working but I didn't. Thanks for the response. I will give it a try for a week and see if it works without to much performance hits. I hope it doesn't cause I really like it and the couple of users I showed it to like it as well. On their machines I didn't notice any performance issues. – Dan Thomas Apr 03 '12 at 15:31
  • 1
    Nobody working behind a corporate firewall will ever see your code. Also: this is StackOverflow: we expect people to post the code here. so that it is immediately searchable and viewable... And can be visually inspected before it's ever compiled and run: there might be a reason why firewalls don't let users open unknown and uninspected files. – Nigel Heffernan Jun 09 '17 at 17:54
  • @Linger, the link to the code is no longer working. Can you share the code again? – Ben Nov 07 '19 at 15:33
1

You can use a start-up form as I suggested above. You can even base the start-up form on a comments table that can be edited by the users and will display the most recent and / or relevant information. The form can be displayed at start-up and then referred to at any time by the users.

In the past, I have included a ? button on forms that open such a form at the relevant page.

Fionnuala
  • 90,370
  • 7
  • 114
  • 152
  • I do have a start-up form that I have used in the past. I was just looking for a better way of doing it. Thanks for your response. – Dan Thomas Apr 03 '12 at 14:48