Solved

How to show the database name first in the Access window caption in the taskbar?

Posted on 2015-02-23
12
294 Views
Last Modified: 2015-02-24
Ok, the problem is: in the Access 2003, when you opened a database, in the taskbar you would be shown “MyDatabaseName: Database”, and if you would have opened a table, it would be shown “MyTableName: Table”, so if you have several databases opened, you would get instant overview where is each one just by glancing at the taskbar.

In the Assess 2010 (I suppose 2007 too) however, when you open a database, you get “Microsoft Access – MyDatabaseName: Database” as the caption in the taskbar, but, due to a finite length of the window caption in the taskbar (XP, or Win 7 with “Never Combine Taskbar buttons” option enabled), the actual caption in the taskbar is trimmed to “Microsoft Access…”; and now if you have opened multiple databases, you have a bunch of “Microsoft Access…” windows, without  that instant overview to what database each of them refer, unless you hover the mouse in the taskbar…

I really would like to know in what state of mind was the person in MS who thought that this change was a good change. Nevertheless, the question now is how to change this behavior to a previous one, or a similar one, so that in the taskbar is shown the database file name first?

I have found that  if you set File>Options>Current Database>Application Title, to e.g. Application Title=MyTitle, it would be shown MyTitle in the taskbar, which is ok, however, I don’t want to have to manually have to change the current database Application title for each and every db I open… so alternatively, the question could be: is there a way to tell access to automatically as the Application Title use the current database file name? And if there is no such an option, and Add-In to automatically do that would be also ok I suppose…
0
Comment
Question by:npaun
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 84
Comment Utility
That option is database-specific, so you'd have to change it for each database.

There is no add-in available to do these things, but it's a one-time change for existing databases, and you can set this option prior to deployment for new databases.
0
 
LVL 49

Accepted Solution

by:
Gustav Brock earned 500 total points
Comment Utility
You can call this sub:

Public Sub CreateTitle()

    Dim prp     As Property
   
    On Error Resume Next
    Set prp = CurrentDb.CreateProperty("AppTitle", dbText, Split(CurrentProject.Name, ".")(0))
   
    CurrentDb.Properties.Append prp
   
    Set prp = Nothing

End Sub
0
 

Author Comment

by:npaun
Comment Utility
@Scott McDaniel
Thank you for the comment.
I'm not quite sure what did you mean by "you can set this option prior to deployment for new databases."?
The point is, I have A LOT of existing databases (1000+), with various names, which I have to open several at the time, and it is not a solution for me to change the Application Title for every db... I would need that Access simply use the database name automatically as the App Title... or some other approach where the db name would be shown first in the  window caption in the taskbar....
0
 

Author Comment

by:npaun
Comment Utility
@Gustav Brock
Thanks.
As a macro? Hm, 'll try... but, again, it would mean manually running a macro for each and every opened db... Better than having to manually change the AppTitle in the options, but worse than having an add-in which would do it automatically when a db is opened...
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
Well, you could replace CurrentDb with a variable db, then loop through your folders and 1000s of files, pick the file names, and pass these to:

    Dim dbs     As DAO.Database
    Set dbs = DAO.OpenDatabase(FileName)

and:

    Set prp = CurrentDb.CreateProperty("AppTitle", dbText, Split(FileName, ".")(0))

/gustav
0
 
LVL 84
Comment Utility
The point is, I have A LOT of existing databases (1000+), with various names, which I have to open several at the time
Then Gustav's solution would seem to be the best choice.

Even with an Add-in, you'd have to open each database and "enable" that add-in - so you're back to square one. At some point, you will have to open and set that property for each database. You can do so manually, or you can use Gustav's code suggestion to loop through your databases and set it from code.
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 

Author Comment

by:npaun
Comment Utility
yes, probably...
The remaining problems is, that that bunch of databases is not fixed, i.e. than can still be created, or renamed, and also, they are not in a specific place (one folder), but on various places... I, even if  I make a program to scan the entire system, soon it could/would become uncompleted... I would need to very often run the program to maintain AppTitle up to date for each very db... viable, although cumbersome and inelegant, for something that MS should make trivial...
0
 

Author Comment

by:npaun
Comment Utility
@Scott
PS: In a case of such an add-in, shouldn't ad-in be able to autostart when Access is loaded?
0
 
LVL 49

Expert Comment

by:Gustav Brock
Comment Utility
> .. shouldn't ad-in be able to autostart when Access is loaded?

I don't think that is possible.

/gustav
0
 
LVL 84
Comment Utility
I don't deal with Addins much, but it would seem to be a HUGE security hole in Access if you could automatically start an AddIn without the user first opening the database and enabling that Addin for each database. But, again, I don't use them, so the behavior you want may be available.

for something that MS should make trivial...
I'm not sure I agree with that, but to each is own I suppose. It's quite apparent that MSFT is not doing anything further with the desktop environment (look at the direction Access has gone in the past few versions).
0
 

Author Comment

by:npaun
Comment Utility
@Scott
regarding "for something that MS should make trivial...", I meant regarding for an option to be able to use db file name as the Application Title, or at least leave to the option to show the Access window caption in the previoos format db file name first, and not to broke small but a useful behavior by pointlessly putting "Microsoft Access" first for every window caption. It is my honest opinion as a user. Not meant "MS should make autostart of add-ins trivial", in that I could agree with you, and in that respect MS of course would have my full support to do as prudent as it would consider...
0
 
LVL 34

Expert Comment

by:PatHartman
Comment Utility
really would like to know in what state of mind was the person in MS who thought that this change was a good change.
I ask myself that frequently since the advent of A2007.  It seems that each new version is created by a person who has never even seen previous versions of Access and so they change random things, usually for the worse.  I could give you a dozen stupid, mindless changes that make Access less "accessible" than it was before.  Sorry, I had to rant.

Best practice would be to always give the database a name when you create it.  Of course that doesn't help you with the "1000's" you have to open although Gus' code will go a long way toward assigning names to existing databases.  But if you don't mind an observation, if you are opening "1000's", you are almost certainly dealing with "spreadsheets" rather than databases and that is the true problem.  Rectifying that would be the best use of your time.
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

PaperPort has a feature called the "Send To Bar". It provides a convenient, drag-and-drop interface for using other installed software, such as Microsoft Office. However, this article shows that the latest Office 2016 apps (installed with an Office …
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
Learn how to create and modify your own paragraph styles in Microsoft Word. This can be helpful when wanting to make consistently referenced styles throughout a document or template.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now