Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Application Title < Other Names | Top X >
Application Title
By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   4 years ago

Change Database Application Title Using VBA


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark Join Now

In this Microsoft Access tutorial, I will show you how to change the database application title (the text on the Title Bar at the top of the Access window, and on the Task Bar at the bottom of the screen) using a few lines of VBA code.

Pre-Requisites

Links

Usage

  • CurrentDb.Properties!AppTitle = NewTitle
  • Application.RefreshTitleBar

Code Vault

Recommended Courses

Learn More

FREE Access Beginner Level 1
FREE Access Quick Start in 30 Minutes
Access Level 2 for just $1

Free Templates

TechHelp Free Templates
Blank Template
Contact Management
Order Entry & Invoicing
More Access Templates

Resources

Diamond Sponsors - Information on our Sponsors
Mailing List - Get emails when new videos released
Consulting - Need help with your database
Tip Jar - Your tips are graciously accepted
Merch Store - Get your swag here!

Questions?

Please feel free to post your questions or comments below or post them in the Forums.

Keywords

access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, #fasttips, property not found, CurrentDb.Properties!AppTitle, Application.RefreshTitleBar, change application title, database title

 

 

Comments for Application Title
 
Age Subject From
4 yearsError MessageJoe Sutcliffe

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Application Title
Get notifications when this page is updated
 
Intro In this video, I will show you how to change the application title of your Microsoft Access database using VBA. We'll cover why you might want to update the title at runtime, walk through the basic VBA code needed to set or change the AppTitle property, explain how to handle situations where the property doesn't exist, and discuss common pitfalls such as missing icons that can prevent the title from updating properly. I'll also demonstrate how to display dynamic values like usernames or warning messages in the title bar, including a simple flashing warning using timer events.
Transcript Welcome to another FAS Tips video brought to you by accesslearningzone.com. I am your instructor, Richard Rost.

In today's video, I'm going to show you how to change the application title of your Microsoft Access Database using VBA. That's the title that appears across the very top where it usually says Access, and of course down here in the taskbar. You can make it say whatever you want.

Now, this is a developer lesson. We are going to use some VBA to do this. The benefit is you can do it while the database is running. You can change it, make it say different stuff. Your user sees different things like a warning message or your logged on username, that kind of stuff.

If you're not a developer, if you don't know how to program in VBA, and you just want to change the application title, the database title, I have a whole separate video that shows you how to do just that. I actually had to change the little icons too. If you don't care about the programming part of it and just want to see how to change the database title, there's a setting for it under File, Options. It's really easy to do. Go watch this video.

If you want to learn how to change it using some VBA, don't be scared of VBA. We need two lines of code, best case scenario, to do this change. That's it. I'll show you how to do that in just a few minutes.

If you've never done any VBA programming before and you want to learn how, go watch this video. I ensure that the VBA video is about 20 minutes long. All you need to know to get started, and then come on back and we'll continue right here.

Why would we want to change the application title in the program itself? Well, you can put the username who's logged on there with the environment variable. I'll show you how to do that. You can do a little flashing warning message with a timer event. I'll show you how to do that as well.

If you want to have your computer on silent and be able to know if something's going on, you'll see this flashing on your taskbar. There are all kinds of reasons why you might want to change this, but that's up to you. I'm just going to show you how.

Another reason I do it is if you've done any programming where you're jumping between two databases and you want to be able to switch between them and show which one is active using the AppActivate. Remember this thing a couple of weeks ago? You can change the name using the application title, and then AppActivate can more easily find it.

Here we are in my TechHelp free template database. And if you remember: File, Options, Current Database. There's the application title now.

If you want to change that in code, let's go into Design View, right-click, Build Event, that'll bring up Code Builder. And right here, we're going to put the two simplest lines of code in which this will work. It's going to be CurrentDb as the current database dot Properties. There it is: Properties, exclamation point, AppTitle. That is the AppTitle property of the current database equals whatever you want to say: Rick is awesome. That changes the AppTitle property of the current database.

Then you have to refresh the title bar. It's going to be Application.RefreshTitleBar, right there. That's it. There are the minimal two lines of code you need, best case scenario.

And I say best case scenario because I'm going to show you what might not happen in a minute. Just try this. Save it. Let's go back to the database, close that, open it back up again, and you're ready. Click my button. Boom. There you go. Rick is awesome. Sweet. Rick is awesome.

I say best case scenario because this will only work if you already have an application title set manually. So if you're running a new situation where you have to give the user code where they might not have one, then that won't work.

Let me show you. Go into File, Options, Current Database. If you delete the application title, watch this: delete it. Now you have to close the database. Reopen it. As you can see, there is no application title.

If I try to run this now, you'll get "Property not found" because we deleted that property. And that code that we gave it. Where are you? I'm hanging out. Come back in here, Design, right-click, Build Event. This code changes the property. But if it doesn't exist, we have more work to do.

If you're distributing your own database and the user can't change that, that's all you need. But we have to take that into consideration if you're working with other databases, so we need to get a little bit more complex than this.

We're going to need a couple variables. You can reference CurrentDb all the time, but I prefer to make a variable and set that equal to the CurrentDb. So we're going to Dim db As Database. And then we'll need an object variable: o As Object. What's the object? You'll find out.

Now, this code is going to throw an error if the AppTitle doesn't already exist. So we need an error handler: On Error GoTo we'll call it ERR. Error handling is something I cover in this video. If you need to learn about error handling, go watch this. Again, I'll put links to all this stuff down below. It's all free videos. Go watch it, and then come on back.

If an error is encountered, we're going to come down here and go to the spot we're going to call ERR:. That's a named location called error.

Then what we're going to do is we're going to Set db = CurrentDb, because we're going to refer to it a couple of different times. It's not always necessary to do this, but in certain circumstances, it is, because every time you call CurrentDb, it actually gets a new instance of CurrentDb. So if you want to be referring to the same instance of the database object all the time, you want to do it like this. Trust me.

For something where you're just going to call something once, it's okay to use CurrentDb, like if you're just running a quick SQL statement. But if you're going to be using it several times in the same procedure, it's better to initialize it as a variable.

So we set the application title and do our refresh. If no errors are encountered at this point, we can Exit Sub. We're good.

But if we do run into an error, you want to come down here, and then we're going to have to create that property and add it to the database. Properties are handled as objects. I have a whole separate developer lesson on exactly what objects are, but for now, all you have to worry about is this:

Set o (my object variable) = db.CreateProperty. There it is. What's the property called? AppTitle. The same thing we were trying to set up here earlier. Comma. What's the type of property? Well, that's a text-based property: dbText. Again, I cover this in a lot more detail in my developer series. And then what do you want to give it? What's the property value? We're going to use the same thing here.

Since I don't like to copy things in more than one spot, let's make it a value up here. We'll just make it s As String. And then down here, I'll say s = "Rick is awesome". Then we'll just change the assignment to s. And then we'll put s here.

So we're going to set an object variable equal to db.CreateProperty ("AppTitle", dbText, s), then we have to add that object to the properties collection of the database. It looks weird: db.Properties.Append o. We're going to set up that object as a database property and then append it to the list of properties. Why they did it this way, I don't know. That's how they did it. I didn't build Access. I just teach you how to use it.

At this point: Resume Next. And yeah, there's more that could happen in here if it's unable to append the property. There are other errors that might pop up. I'll talk about those in a minute. But I'd say 99.99% of the time, this should work just fine. Real simple error handling here.

Save it. Come back to the database. Close it. Now remember, our database does not have that property at this moment. So we're going to add it. Boom. There it goes.

If you go in here now: File, Options, there it is. We created the property as an object. We added it to the database properties. There it is.

You can do that with a lot of these different things. In fact, I covered the database icon in this video here. We just did this a little while ago.

So there you go. That's basically how you do it.

Now, there are some other minor things that might come up. For example, here's the full code that I have in my code vault that I just wrote, and it's very similar. We have our error handler, we set the equal current database, set the title, refresh title bar. Down here, I added some additional error handling because if the database can't find that property, it's going to have a certain error not found number and that error number is 3270. So you can check to see if that's the problem, and if it is, then you do that stuff. If not, then just tell the user there's some other error going on here. I don't know what. And then exit back out.

Also, one other thing: RefreshTitleBar will also fail if the database icon is missing. With that check icon that I just showed you a second ago, you can check for that as well. There's code there for that one.

If you're in here: Application Icon. If you've got something in here, I see this happen a lot, and in fact, a couple of people have emailed me about this over the last couple of years. If you've got an icon specified for your database, and it's c:\\database\\myicon.ico, whatever, works fine on your system. Application title changes fine on your system. Yes, send the database to someone else, and the application title doesn't change. There's no error message, nothing says why not.

The problem is that the icon is missing. And if the icon is missing, guess what? The application title won't refresh. You would think they would give you an error message about that, but they don't. So make sure that's working, and you can check for that with the other code that I showed you.

Gold members, this is in the code vault. Get typing! Another reason to upgrade or join as a Gold Member. Let me get access to the code vault. All kinds of cool stuff in it, including the other day's check icon code. This one I released for free, you guys can have this one for free. There's a link to this one on that page.

I'm going to take this code here, this ChangeDatabaseTitle sub, copy that, flip back over to my database, and let's go to a global module here that I have. We'll just drop that code in there, and now I can call ChangeDatabaseTitle anywhere in my database.

Let's bring the focus so you can see it all. Let's go back to this guy, and we don't need all that in the Hello World button anymore. All we need now in here is ChangeDatabaseTitle, and what do we want to say? Hi there. Save it. Give it a quick Debug Compile, which you should do on a regular basis. Hit the button. Boom. Hi there. Hi there.

Let's see the current date and time there. Well, you can put in here something like TechHelp, and then format today's date as yyyy-mm-dd, the perfect date format. ISO date standard, which I always use. Save it. Back out here. Click the button. Boom.

Notice it's also down here on your taskbar.

Want to show the username there? How do we do the username? That's going to be right here. We'll say: Environ, environment variable. What is it? USERNAME. Save that. And that's going to use your Windows username. I'm "Amaker". That's what I log on to my computer as: Amaker. Want to know what different system environment variables are available to you? Just open up a command prompt, type in the word SET, and press Enter, and there they are. Those are all your different environment variables.

My username is right there: USERNAME=Amaker. I talk about those environment variables in the Track User Log On/Off video. Is it perfect? No. It's good enough for most businesses.

Want to see the flashy thing? We'll do the flashy thing.

Bonus time. Flashy thing.

Now, I show you how to do timer events in my Reminder Pop-Up video, where you have a timer event running in a form and it just waits like maybe five minutes or however long you want it to wait, and then it checks a table to see if you've got any reminders or if the date has passed, and it pops up a little form. Go watch this if you've never done any timer stuff before.

We'll just do a simple timer event in the main menu. And you can use this stuff I taught in that video to actually check for a warning or pop up or a timer or whatever.

We'll need a little checkbox. You can hide it. It just has to be somewhere on here. You can use a temp var, you can do any kind of variables you want. Checkbox is the easiest to throw up on a form. We'll just drop a little checkbox right here, get rid of the label, because again, you can hide it. Call it something. We'll just need it to cycle on and off between which application title we're showing. It'll say "Warning" and then go back to normal and then go "Warning" and then go back to normal, or once every second or whatever you want it to be.

Let's just call this "x", and then give it a set value so it starts off at no—whatever.

Now in the timer properties, let's go to the timer interval. That's one second, so I'll go 1000—that's a thousand milliseconds. The On Timer event will just be something that flashes back and forth between on and off, whatever you want the two things to be.

So if x, then ChangeDatabaseTitle to "Warning, Danger Will Robinson." Else, ChangeDatabaseTitle to whatever your normal title is, such as "Access Learning Zone". End If. Then just flip them so x = Not x. If it's true, make it false; if it's false, make it true. Easy enough.

You'll wrap that inside of something else that actually checks for the condition. You'll have another If Then statement outside, where you do your lookup or whatever you're doing that I showed in the other video to check to see if you have a message, and you can pop up "You have messages waiting," that kind of thing.

Save this. Close that and then open it back up again. There you go. You can see the warning flipping. Change it up here, change it down here, and even if your database is minimized, you'll still see that.

I have some other projects. Pay no attention to the man behind the curtain. I have lots of stuff on my desktop. You can see lots of projects in the works, including one really cool one that I'm doing that picks Access databases and puts them on the web, but that's still hush. I haven't released any information on that one. Only my moderators know about that one right now. We're getting there.

You can see how even if your database is minimized at this point, you can still see a silent warning flashing right there. That could be useful if you want to be secretive, clandestine, whatever. If you want, you can also make it play a sound.

I showed you that in the video too. I'm going to play a sound in TechHelp. I think in the free video I show you how to make the database beep, which is just the Beep command, and in the Extended Cut I show you how to actually play a sound file like a .wav file or something. That's what you hear for my hourly chime. My database every hour plays that transporter sound so I know. I make the database restart itself once an hour—it basically launches another database that checks for updates (my Access Updater), and then it relaunches the original database.

I find that Access runs best if you restart it regularly. As great a database program as Access is, it still runs into the occasional memory leak, especially since mine runs constantly, 24/7, doing stuff. So once an hour I have it shut down, run updates, and restart again.

If you really want to learn more stuff like this, take my developer course. These free videos are cool, but I show you little bits and pieces here and there. That's what the FAS Tips are all about: how to do this little thing, how to do that little thing. My TechHelp videos, I go into a little more detail with the extended cuts. But if you really want to learn Access, my developer course goes from level one all the way up. I think we're at Level 42 or 43 right now. Every one, we go over a little project, cover a little more of something, go into more depth, and I teach you stuff in the order you should learn it.

With just bouncing around, trying to pick stuff off here and there, even with my videos, you can learn a lot, but you'll learn a lot more if you take a full structured course in order.

That's the stuff—there's a link right there. I put it down below; you can click on it for more information.

So that's it. That's your FAS Tip for today. I hope you learned something. I'll see you next time.
Quiz Q1. What is the main objective of the video tutorial?
A. To show how to create a new Access database from scratch
B. To demonstrate how to export data to Excel using Access
C. To show how to change the application title of a Microsoft Access Database using VBA
D. To explain how to back up an Access database

Q2. What does the application title appear on in Microsoft Access?
A. Only in table names
B. Across the top title bar and the taskbar
C. In every form footer
D. In database queries only

Q3. What is the simplest way to change the application title, as shown for non-developers?
A. Using VBA code
B. Through the Windows Registry
C. Through File, Options in Access
D. By editing the database file in Notepad

Q4. Why might a developer want to change the application title using VBA?
A. To update the database password dynamically
B. To display things like warning messages or the logged in username
C. To prevent users from closing the database
D. To enable multi-user support

Q5. What is the minimum number of VBA code lines needed to change the application title, in the best-case scenario?
A. Four
B. Five
C. Two
D. One

Q6. If the "AppTitle" property does not exist, what error is encountered when trying to change it using VBA?
A. File not found
B. Property not found
C. User permission denied
D. Memory overflow

Q7. What additional task must be performed if the AppTitle property does not exist in the database?
A. Reinstall Access
B. Create the property using db.CreateProperty and append it to the properties collection
C. Clear all database records first
D. Compact and repair the database

Q8. Why is it better to Dim a variable as Database (like Dim db As Database) instead of referencing CurrentDb every time?
A. It reduces the size of the database
B. Each call to CurrentDb creates a new instance, so using a variable keeps references consistent
C. It encrypts the database
D. It allows for automatic backups

Q9. What should you do in the code after setting or creating the AppTitle property to update the title bar?
A. Restart the computer
B. Use Application.RefreshTitleBar
C. Save and close Access immediately
D. Reindex all tables

Q10. What issue might prevent Application.RefreshTitleBar from updating the application title?
A. Insufficient hard drive space
B. Missing database icon file
C. Expired Access license
D. Active filter on a form

Q11. What is the effect of missing the specified application icon file when sharing your database with others?
A. The application title changes, but the icon does not
B. An error message appears explaining the missing icon
C. The application title does not update, but there is no error message
D. The database becomes corrupted

Q12. How can you display the current Windows username in the application title using VBA?
A. Use the GetUser function from Excel
B. Use the Environ function with the USERNAME environment variable
C. Use DBCurrentUser in Access
D. It is not possible in Access

Q13. How can you make the application title flash a warning message automatically?
A. By using a timer event on a form and toggling the title with a variable or checkbox
B. By changing the Windows theme
C. By modifying the registry
D. By increasing the database file size

Q14. What command in the Windows command prompt shows all environment variables?
A. GETENV
B. VARIABLES
C. SET
D. LISTENV

Q15. What does the instructor recommend to ensure reliable application performance over time?
A. Constantly clear all tables
B. Restart Access regularly to manage memory leaks
C. Only use one form at a time
D. Avoid using any VBA code

Q16. What should you often do in your VBA editor to check for errors in your code?
A. Delete all modules
B. Use Debug Compile
C. Reboot the machine
D. Change database password

Q17. What is the benefit of using structured, ordered courses rather than picking random videos?
A. It helps you learn in a proper sequence for deeper understanding
B. It reduces disk space requirements
C. It disables VBA errors
D. It automates backups by default

Answers: 1-C; 2-B; 3-C; 4-B; 5-C; 6-B; 7-B; 8-B; 9-B; 10-B; 11-C; 12-B; 13-A; 14-C; 15-B; 16-B; 17-A

DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary Today's video from Access Learning Zone covers how to programmatically change the application title of your Microsoft Access database using VBA. As your instructor, I'm here to walk you through the process and explain why you might want to use this technique in your own projects.

The application title is what you see displayed at the very top of your Access window and in the Windows taskbar. By default, it just says "Access," but you can set it to anything you want. While there is a way to set this manually through the File, Options menu, the real power comes from being able to change it on the fly with VBA. This is especially useful if you want your application title to reflect dynamic information, such as a warning message, a user's name, or any other status.

If you do not want to do any programming and just want to set the title manually, there is a very simple way to do it in the database options. I have a separate video dedicated to that process, so check that out if you just want to take the easy route.

For those of you interested in the VBA approach, I want to assure you that this task is not difficult, even if you are new to VBA programming. You only really need two lines of code to change the application title in straightforward cases. If you are brand new to VBA, I recommend watching my beginner video on the topic first, then returning to this lesson.

There are several reasons to change the application title using code. For example, you might want to display who is currently logged into the database by pulling the username from an environment variable. You could also implement a visual warning that flashes in the taskbar, which can alert users even if their computer's sound is off. You may also be switching between multiple open Access databases and want to clearly indicate which one is currently active.

Initially, if you have already set an application title property using the options menu, changing it in code is easy. You simply set the property using CurrentDb.Properties with the name "AppTitle," assign your desired value, and then refresh the title bar. Those are the minimum steps.

However, this best case scenario only works if the property already exists. If someone has not set an application title property beforehand, your code will generate an error because that property is missing. In that case, you need to handle the situation by creating the property in code.

To do this, you should use an object variable for the database, set an error handler, and attempt to update the property. If you get the specific error number that indicates the property does not exist, you can then create that property, set its value, and append it to the database's property collection. Once that is in place, you refresh the title bar as before.

It's important to note that if your application is missing an icon file that has been referenced in the database settings, the title bar may fail to refresh, and you might not get any error message to warn you about it. This can cause confusion when distributing your database to others, so make sure the icon file is always present, or clear the icon property if it isn't needed.

Once you have written a general-purpose routine to change the application title, you can place it in a global module and call it from anywhere in your database. This makes it easy to update the title to display different messages or information as needed.

You can even make the title dynamic. For example, display the current date in ISO format, or show the current Windows username by using environment variables. To find out what environment variables you have available, open a command prompt, type "SET," and review the list that appears.

For more advanced functionality, you might want a warning that flashes. This can be achieved by using timer events in a form. For example, you can toggle the title between a normal message and a warning message every second, using a hidden checkbox or other variable to keep track of the state. By setting the timer interval property and writing a simple toggling procedure, you can create blinking warnings that are visible on the taskbar even when the database is minimized.

In some of my other videos, I cover how to play a sound in response to events or how to create pop-up reminders. These features can be combined so that you have both a visual and an audio alert for urgent situations. I also demonstrate how to format more complex status information in the title.

If you want to really deepen your understanding of programming in Access, I strongly recommend following a structured developer series, which builds your skills step by step. While free tips like this are great for learning specific tricks, taking a full course in order will greatly enhance your abilities and confidence.

For a full, step-by-step video tutorial that covers everything I have discussed here, visit my website at the link below.

Live long and prosper, my friends.
Topic List Changing the application title using VBA in Access

Using the AppTitle property in VBA

Refreshing the title bar with Application.RefreshTitleBar

Handling missing AppTitle property errors

Creating and appending the AppTitle property in VBA

Setting up variables for database properties in VBA

Implementing error handling for property changes

Copying code to a global module for reuse

Dynamically displaying the current date in the application title

Displaying the Windows username in the application title

Using the Environ function to get environment variables

Creating a flashing warning message with a timer event

Cycling application title text using a form checkbox and Timer

Using the Timer event to alternate Access titles

Discussing issues with missing application icons affecting RefreshTitleBar functionality

Checking for the existence of the database icon to ensure title updates

Calling the ChangeDatabaseTitle subroutine from buttons or events
 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 4/30/2026 12:17:43 PM. PLT: 1s
Keywords: FastTips Access property not found, CurrentDb.Properties!AppTitle, Application.RefreshTitleBar, change application title, database title  PermaLink  Application Title in Microsoft Access VBA