I have an Access Front-End in which I want to auto-detect whether it is compiled into an accde, and then rename the apptitle.
If CurrentDb.Name Like "*.accde" Then
CurrentDb.Properties("AppTitle").value = "Release Client"
Application.RefreshTitleBar
Else
CurrentDb.Properties("AppTitle").value = "Test Client"
Application.RefreshTitleBar
End If
When I launch my .accdb in which I develop/test, everything works. I can change the apptitle manually, close and reopen, and it renames to Test Client. However, once I compile it, upon launching the newly compiled .accde, it does not rename the apptitle.
I tried moving the code from the AutoExec function to the first form's OnOpen event and even to the first form's OnTimer event (with a setting of 1).
If I run the code manually through the Immediate window, it resolves appropriately, so the code seems correct.
I think I'm missing the link between running this code in an .accdb and running it in an .accde.