PDA

View Full Version : Solved: Removing Titlebar from Popup



VWP1
09-23-2011, 12:11 PM
I am interested in knowing how to hide the titlebar on my popups. I have a procedure to close the popup form, but the titlebar is now an eyesore, for the overall appearance of the application.

Also, is there anything else I would need, besides a procedure to close the form (button), seeing that the titlebar will be hidden?

hansup
09-23-2011, 02:15 PM
I am interested in knowing how to hide the titlebar on my popups. I have a procedure to close the popup form, but the titlebar is now an eyesore, for the overall appearance of the application. Try this combination of properties in your form's property sheet:
Border Style = None
Control Box = No
Min Max Buttons = None
Close Button = NoAdjust those till you get the combination which best matches what you want. With Access 2003, that combination gives me a fairly bare form window with only the form's caption in the title bar.

You can delete the caption on the property sheet ... but with no value for that property, Access will use the form's name as the caption. You can defeat that by assigning a null string as the caption property at form open.

Private Sub Form_Open(Cancel As Integer)
Me.Caption = vbNullString
End Sub
With Access 2003, that gives me an extremely bare form. Maybe too bare. :dunno


Also, is there anything else I would need, besides a procedure to close the form (button), seeing that the titlebar will be hidden? Add a command button, cmdClose, to the form. Then use this as its click event:

Private Sub cmdClose_Click()
DoCmd.Close acForm, Me.name
End Sub
You can add an AcCloseSave option (acSaveNo; acSavePrompt; or acSaveYes) to DoCmd.Close if desired. See Access' help topic for details.