Problems with RefreshTitleBar on 2nd Refresh.

Joined
Feb 15, 2006
Messages
1
Reaction score
0
I have an application that changes the MS Access (2002/2003) title bar everytime I make certain Table linking changes to the DB.

Recently, after the second refresh, the titlebar only shows a series of little boxes. I can tell by the pattern and size changes that it is misrepresenting the current AppTitle. For example, if I put in a large title there are lots of little squares. Small title, fewer squares.

The following code has always worked. When the application opens I set the AppTitle. Later if I link to different tables I change the AppTitle. It is the second time that the refresh shows squares even though it is the same code with the same data. When checked with Currentdb.Properties("AppTitle") then data is correct.

Has anyone heard of this problem?

Thanks in advance...

Here is the code I use:

Public Function AddAppProperty(strName As String, _
varType As Variant, varValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo AddProp_Err
dbs.Properties(strName) = varValue
Application.RefreshTitleBar

AddAppProperty = True
AddProp_Bye:
Exit Function
AddProp_Err:
If Err = conPropNotFoundError Then
Set prp = dbs.CreateProperty(strName, varType, varValue)
dbs.Properties.Append prp
Resume
Else
AddAppProperty = False
Resume AddProp_Bye
End If
End Function
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top