How to get AppTitle??

gmatriix

Registered User.
Local time
Today, 04:17
Joined
Mar 19, 2007
Messages
365
Hello All,

I am trying to get the AppTitle of my application for some code that I am running.

Here the situation:
If you have not already figured out there are some differences with 2010 Access and 2013 Access. One of which is instead of Microsoft Access in the title bar it just says Access.

What the big deal right?

Well I was using that to set focus back to access by using

Code:
AppActivate "Microsoft Access"

So I just trying to make it dynamic by reading the AppTitle first and using that to change the AppTitle.

I was trying to use

Code:
Dim AppT as String

AppT = currentDb.Properties("AppTitle").name
'rest of code

AppActivate AppT
End Sub

Or something like this. but it does not work.

Any Ideas?

Thanks
 
to manipulate the application title, I've always used this method:
you need to declare this function as you would a global variable ie within a module but outside a function
Code:
Private Declare Function SetWindowText Lib "USER32" Alias "SetWindowTextA" (ByVal hWnd As Long, ByVal lpString As String) As Long
This is in turn called using this function:

Code:
Public Sub SetAppTitle(TitleText As String)
    SetWindowText Application.hWndAccessApp, TitleText
End Sub

David

All you then need to do is pass to SetAppTitle your application title using:
Code:
SetAppTitle "   -- My Application Title Database -- "
 
Thanks David!

This is very helpful

Thank You!
 

Users who are viewing this thread

Back
Top Bottom