Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Removing square brackets from caption

Status
Not open for further replies.

mikelev

Technical User
Mar 23, 2004
223
US
As trivial as this may sound......Is it possible to remove the brackets that surround my caption?

Appears as:
Client Database - [Welcome to Client Application]


Would like it to appear:
Client Database - Welcome to Client Application

Thanks in advance for any ideas
 
Which caption?

Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
The caption property for my form.

Form>Properties>Format>Caption
 
I'm surprised that no one has answered the question.

If you're at run time, then to set the caption of a form you simply

Me.Caption = "Whatever you want the caption to Be"

If at design time, open the form in design mode, bring up the properties window for the form, and on the Format tab, enter your desired caption.

Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
Thanks CajunCenturion:

Both of these methods produce the [] brackets surrounding the caption?


Any other ideas?
 
Then either the caption is being set elsewhere, or you're talking about a different window, or you're using a function call embedded in the assignment statement which is returning the brackets, or perhaps even something else. Something is missing in the information that you've provided.

Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
I created a new mdb and imported a single form to rule out any other possibilities. The brackets still appear?

 
After looking further I should have explained that this occures when the form is maximized, and the application name appears in the upper most left corner, next to "Microsoft Access" icon
 
Ah, so it's not your form that you want to change the caption of - you want to change the caption of the Main Access Window?

Good Luck
--------------
To get the most from your Tek-Tips experience, please read FAQ181-2886
As a circle of light increases so does the circumference of darkness around it. - Albert Einstein
 
For the Main Access window you can change the Application Title from the startup properties under Tools/Startup..., or you can do it using VB by entering the following in a module (this way you can change it a any time)


ChangeProperty "AppTitle", dbText, "Your Caption Here"
Application.RefreshTitleBar


the function for the above code


Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Database, prp As Property
Const conPropNotFoundError = 3270

Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True

Change_Bye:
Exit Function

Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function


Hope this helps
Dalain
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top