By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,495 Members | 1,110 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,495 IT Pros & Developers. It's quick & easy.

Changing the desktop icon of a Microsoft Access application

P: 4
Hey All,
I hate it when my first post on a forum is me asking a question but it is a pretty simple question which I just cannot work out.
The title of this post explains all; basically I need to change the icon of an Access Database (.mdb) from the default pinkish colored Microsoft one.
I am aware that I could perhaps create a shortcut and change the icon for this due the nature of the dynamically remapping cluster which the Shortcut will be stored on this cannot be done.
After some reading, I did find where windows icons are stored
Expand|Select|Wrap|Line Numbers
  1. ::/Windows/System32/Shell32.dll
This obviously is a dll file so I can not just open it and paste in our replacement icon then somehow add it to Access that way.
I did find some software which allows you to open the .dll and display the icons inside, which I think you can edit and also add your own, but I do not see a way to save this back as a .dll, only as a .ico.

I did not think this would be so hard.
Thanks in advance,
-Craig
Dec 6 '11 #1

✓ answered by NeoPa

There are two different approaches here :
  1. Changing the icon that shows when viewing the file in Windows Explorer for instance.
  2. Changing or creating a shortcut to this database which shows a different icon.

The first is handled by the File Associations in Windows. Any such change here would necessarily pertain to all such files recognised by extension as MDB, so cannot practically be achieved.

The second can be managed by ADezii's code, but it is also possible to create and modify such shortcuts manually. To modify an existing shortcut simply select it and choose Properties (Right-click wherever it's found but Alt-Enter if selectable - for instance from Windows Explorer). When the Properties window is open (You should find yourself in the Shortcut tab.) click on Change Icon and use the following screen to choose both the file the icon is held within as well as the particular icon in that file.

Share this Question
Share on Google+
10 Replies


P: 1
you don't need to save it as dll. in the dll it is only stored which ico to use.
In fact you may use any image for a application as icon
Dec 6 '11 #2

P: 4
you don't need to save it as dll. in the dll it is only stored which ico to use.
In fact you may use any image for a application as icon
Yes, but how would I get the 32x32 image of our logo I created (saved as .ico) to be used as the icon for the Microsoft Access MDB file?
I dont see an option to change icon?
Only to create a shortcut then change the icon for that, but as I explained this is not possible.
Also, even if it was, my created logo is not in the selection list, only the icons stored in Shell32.dll. How would I add my 32x32.ICO file to this list?
Thanks for your reply, it is very much appreciated.
-Craig
Dec 6 '11 #3

ADezii
Expert 5K+
P: 8,597
The following will create a Shortcut on the Desktop named Test Database.lnk, pointing to the Database C:\Stuff\Test.mdb, with the Icon of C:\Test\Test.ico. The Code can easily be more portable by encapsulating it in a Sub-Routine/Function, and passing it several Arguments.
Expand|Select|Wrap|Line Numbers
  1. With CreateObject("WScript.Shell")
  2.   With .CreateShortcut(.SpecialFolders("Desktop") & "\Test Database.lnk")
  3.     .TargetPath = "C:\Stuff\Test.mdb"
  4.     .WindowStyle = 1
  5.     .Hotkey = ""
  6.     .IconLocation = "C:\Test\Test.ico, 0"
  7.     .Description = "Test Icon Substitution"
  8.     .WorkingDirectory = "C:\Stuff\"
  9.       .Save
  10.   End With
  11. End With
Dec 6 '11 #4

NeoPa
Expert Mod 15k+
P: 31,186
Have you looked in Tools | Startup yet? There is a property there which allows you to set the icon. I've never used it myself, but I expect it's what you're after.
Dec 9 '11 #5

Expert 100+
P: 446
Hi
NeoPa, if you try this you with probably find that the icon selected only appears as a tiny representation in the top LH corner of your open Access application. (In Access 2010 select File to go backstage then select Options, Current Database, Application Icon, Browse, OK, OK then restart)

When I first tried this in 2000 I had expected my Access app to display my icon in Windows Explorer. However, it seems that only .exe files , & maybe others, are interpreted this way but a good-old .mdb file is just shown with an Access 'key' icon.

My solution was to attach the icon to a desktop shortcut as has already been described.

ADezzi, I like your idea of programmatically creating the shortcut. I shall look to running it from my startup form. I shall need to test whether it automatically over-writes an existing shortcut or whether I need to test it exists first before attempting creation. Have you tried this?

S7
Dec 9 '11 #6

Expert 100+
P: 446
ADezii,
Thanks, that works great!

No need to check one already exist either.

I'm not sure I understand the code. I did not have a reference to Windows Scripting Runtime in the Test system I used but it ran OK anyway.

Thanks again for the tip.

S7
Dec 9 '11 #7

NeoPa
Expert Mod 15k+
P: 31,186
There are two different approaches here :
  1. Changing the icon that shows when viewing the file in Windows Explorer for instance.
  2. Changing or creating a shortcut to this database which shows a different icon.

The first is handled by the File Associations in Windows. Any such change here would necessarily pertain to all such files recognised by extension as MDB, so cannot practically be achieved.

The second can be managed by ADezii's code, but it is also possible to create and modify such shortcuts manually. To modify an existing shortcut simply select it and choose Properties (Right-click wherever it's found but Alt-Enter if selectable - for instance from Windows Explorer). When the Properties window is open (You should find yourself in the Shortcut tab.) click on Change Icon and use the following screen to choose both the file the icon is held within as well as the particular icon in that file.
Dec 9 '11 #8

ADezii
Expert 5K+
P: 8,597
Request as stated by the Original Poster [OP]:
I am aware that I could perhaps create a shortcut and change the icon for this due the nature of the dynamically remapping cluster which the Shortcut will be stored on this cannot be done.
Dec 9 '11 #9

NeoPa
Expert Mod 15k+
P: 31,186
You're absolutely right ADezii. I must admit to finding it quite uncomfortable trying to make sense of English written without consideration for grammar and important words simply left out, but if I look at it again, it does indicate the OP is not after a manual solution. Your (clever) code is required after-all :-)
Dec 9 '11 #10

ADezii
Expert 5K+
P: 8,597
@sierra7:
I did not have a reference to Windows Scripting Runtime in the Test system I used but it ran OK anyway.
This Reference is not required.
Dec 9 '11 #11

Post your reply

Sign in to post your reply or Sign up for a free account.