Form Name

  • Thread starter Thread starter Tom
  • Start date Start date
T

Tom

Using Access 2002 when opening a form, named Form1, at the top of the screen
it reads:

Microsoft Access - [Form1: Form]

How can that be turned off?

Tom
 
Hi Tom

go into the design view of the form, bring up the properties dialog (view /
properties) and set a CAPTION for the form.

Cheers
JulieD
 
Thanks Penguin & JulieD

Had already gone along that route - e.g. setting the forms caption to
'rename' when the form was opened gave 'Microsoft Access - [rename]' - it is
the 'Microsoft Access - []' that I want to turn off.

Any other suggestions

Tom


JulieD said:
Hi Tom

go into the design view of the form, bring up the properties dialog (view
/ properties) and set a CAPTION for the form.

Cheers
JulieD

Tom said:
Using Access 2002 when opening a form, named Form1, at the top of the
screen it reads:

Microsoft Access - [Form1: Form]

How can that be turned off?

Tom
 
Use the Menu Tools / StartUp ... and type your Application Title which will
override "Microsoft Access".
 
Thanks Van

That's removed Microsoft Access but leaves us with ' - []' - cna that be
remove?

TIA
Tom


Van T. Dinh said:
Use the Menu Tools / StartUp ... and type your Application Title which
will
override "Microsoft Access".

--
HTH
Van T. Dinh
MVP (Access)


Tom said:
Thanks Penguin & JulieD

Had already gone along that route - e.g. setting the forms caption to
'rename' when the form was opened gave 'Microsoft Access - [rename]' - it is
the 'Microsoft Access - []' that I want to turn off.

Any other suggestions

Tom
 
Not that I am aware of for maximised Form since the Form's caption has to go
somewhere.
 
Van T. Dinh said:
Not that I am aware of for maximised Form since the Form's caption
has to go somewhere.


Tom said:
Thanks Van

That's removed Microsoft Access but leaves us with ' - []' - cna
that be remove?

I've been tinkering with this, and it appears that you can use the
Windows API to set the form's caption to a zero-length string, and then
the "- []" won't appear. I cribbed some code from
http://pietschsoft.com/programming/vbapi/ref/w/wm_settext.html .

Here's code from my test form's module:

'----- start of code -----
Option Compare Database
Option Explicit

Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" _
(ByVal hWnd As Long, _
ByVal wMsg As Long, _
ByVal wParam As Long, _
LParam As Any) _
As Long

Private Const WM_SETTEXT = &HC


Function NoCaption()

Dim wintext As String ' string to set as the window's text
Dim retval As Long ' return value of message

' Store the desired text in a string.
wintext = "" ' in this case, no text at all.

' Send a message telling the form's window to make that string
' its text.
retval = SendMessage(Me.hWnd, WM_SETTEXT, _
ByVal CLng(0), ByVal wintext)

' ** Could use the following to blank the Access application
' ** window's caption.
' retval = SendMessage(Application.hWndAccessApp, _
WM_SETTEXT, ByVal CLng(0), ByVal wintext)

End Function
'----- end of code -----

Then I called the function directly from the form's Open event, by
putting this function expression in the form's OnOpen property:

=NoCaption()

That seems to take care of it, in both restored and maximized state.
Note that I'm not really an API maven, so I don't know if this technique
has unpleasant ramifications.
 
[...]
' ** Could use the following to blank the Access application
' ** window's caption.
' retval = SendMessage(Application.hWndAccessApp, _
WM_SETTEXT, ByVal CLng(0), ByVal wintext)

Note: the last line above needs a comment marker. I reformatted it for
posting, and forgot to add one to the continued line.
 
Thanks, Dirk.

Slightly strange requirement but it is good to know the solution.

--
HTH
Van T. Dinh
MVP (Access)


Dirk Goldgar said:
[...]
' ** Could use the following to blank the Access application
' ** window's caption.
' retval = SendMessage(Application.hWndAccessApp, _
WM_SETTEXT, ByVal CLng(0), ByVal wintext)

Note: the last line above needs a comment marker. I reformatted it for
posting, and forgot to add one to the continued line.

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
I've been tinkering with this, and it appears that you can use the
Windows API to set the form's caption to a zero-length string, and then
the "- []" won't appear. I cribbed some code from
http://pietschsoft.com/programming/vbapi/ref/w/wm_settext.html .

Here's code from my test form's module:

<code snipped>

Interesting code Yoda.

Just as another alternative you could also use the code found here to
have a *maximized* form and no [] issues with the form caption:

http://www.mvps.org/access/api/api0022.htm

Provided of course you enter a caption in the form's properties.
Even an empty string will suffice.

Just a thought.
 
Jeff Conrad said:
Just as another alternative you could also use the code found here to
have a *maximized* form and no [] issues with the form caption:

http://www.mvps.org/access/api/api0022.htm

Provided of course you enter a caption in the form's properties.
Even an empty string will suffice.

Just a thought.

And a good one. But you get a different effect -- the form window
inside the application window, as opposed to just a single window.
It'll all depends on what you want. I don't usually see a point in
hiding the fact that the application can have multiple forms inside its
window.
 
And a good one. But you get a different effect -- the form window
inside the application window, as opposed to just a single window.
It'll all depends on what you want. I don't usually see a point in
hiding the fact that the application can have multiple forms inside its
window.

Exactly.
A different effect for sure, but in my opinion, a much better one
than using DoCmd.Maximize. I never use that for forms any more.
I prefer the other code for the additional benefits.
 
Back
Top