?
Solved

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

Posted on 2015-02-23
12
Medium Priority
?
327 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +1
12 Comments
 
LVL 85
ID: 40625369
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 51

Accepted Solution

by:
Gustav Brock earned 1500 total points
ID: 40625376
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
ID: 40625383
@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
Simplifying Server Workload Migrations

This use case outlines the migration challenges that organizations face and how the Acronis AnyData Engine supports physical-to-physical (P2P), physical-to-virtual (P2V), virtual to physical (V2P), and cross-virtual (V2V) migration scenarios to address these challenges.

 

Author Comment

by:npaun
ID: 40625389
@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 51

Expert Comment

by:Gustav Brock
ID: 40625395
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 85
ID: 40625399
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
 

Author Comment

by:npaun
ID: 40625412
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
ID: 40625415
@Scott
PS: In a case of such an add-in, shouldn't ad-in be able to autostart when Access is loaded?
0
 
LVL 51

Expert Comment

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

I don't think that is possible.

/gustav
0
 
LVL 85
ID: 40625716
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
ID: 40625821
@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 38

Expert Comment

by:PatHartman
ID: 40625952
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes how to import an Outlook PST file to Office 365 using a third party product to avoid Microsoft's Azure command line tool, saving you time.
This article describes a serious pitfall that can happen when deleting shapes using VBA.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

765 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