Microsoft Visual Basic for Applications (VBA) allows users to modify a variety of parameters set in Microsoft Office applications, such as Excel spreadsheets and Access database software. The Access "ChangeAccessCaption.accdb" sample database includes the form that displays the current text in the title bar of the main Access window. The form contains the "AppTitle" property field that you need to use in the VBA script attached to your Windows application if you want to change the text in the title bar of the Access program window. By changing the title of the Access window, you can locate information in your Windows applications easier.
- Skill level:
Other People Are Reading
Click "Start" in Windows, and then click "Microsoft Visual Basic for Applications."
Click "Form" on the Access toolbar, and then double-click on the "BasCaption." Enter "Product Orders" in the "AppTitle" property field.
Enter the following code in the open window to set the "Product Orders" Access title and pass it to the "SetDBProperty" string in your Access database:
' GetTitleBar function retrieves the current Access title
Dim caption As String
caption = GetTitleBar()
Public Sub SetTitleBar(varTitle As Variant)
SetDBProperty AppTitle, caption, varTitle & ""
' Refresh the title bar to change it immediately.
Click the "Set New Caption" button on the form to change the title of your Access application.
Click "File" followed by "Save" to apply the change to the title of your Access database window.
- 20 of the funniest online reviews ever
- 14 Biggest lies people tell in online dating sites
- Hilarious things Google thinks you're trying to search for