Solved

Access '97 remove form Close button - How to ?

Posted on 2000-02-15
6
314 Views
Last Modified: 2012-05-04
This is driving me nuts!  This should be simple.

I have a form that I want to remove the buttons on the top-right (the 'X' on the top-right (close), etc.).

However, I also need the form maximized.

When I run the app, the form is presented maximized (docmd.maximize), but there is a close and a re-size button on the top-right of the form.  If I click the re-size button, the form re-sizes and both the re-size button and the close button go away!  While this is what I want, I need it in the maximized format of the form.

I have set min-max buttons to 'none', close button to 'no', and defined the 'thin' border style.

Any suggestions ?
0
Comment
Question by:chrissmith
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 10

Expert Comment

by:paasky
ID: 2524661
Hello chrissmith,

You want to prevent users to close the form?

Here's one work-around assuming you have your own close button on the form:

Option Compare Database
Option Explicit
Dim CloseForm As Boolean

Private Sub B_CloseForm_Click()
    ' Close allowed only with button
    CloseForm = True
    DoCmd.Close
End Sub

Private Sub Form_Unload(Cancel As Integer)
    ' Cancel event if user pushed window close button
    Cancel = Not CloseForm
End Sub

Regards,
Paasky
0
 

Author Comment

by:chrissmith
ID: 2524702
I have my own close button.  That's the point.  I want to remove the one that Access supplies.
0
 
LVL 7

Expert Comment

by:lmerrell
ID: 2524794
Set the form's Control Box property to "No".

lmerrell
0
Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

 

Author Comment

by:chrissmith
ID: 2524825
I have already done that.  My apologies for not mentioning it.
0
 
LVL 10

Accepted Solution

by:
paasky earned 100 total points
ID: 2524852
I think it's a kind of weird feature (bug?) that the Close, Min and Max button appear into window right upper corner when the window is maximized. I tried to hide buttons with API but without suggess.

I just checked that this question has been asked here earlier and there was an API sample you might want to try / modify. See Q.10289239 (5 points).

Paasky
0
 
LVL 3

Expert Comment

by:tomk120999
ID: 2524881
This is another approach you might try.  Don't maximize the form, just size it to take up the whole screen while in the "window" mode.  Then all the "no buttons/menu" choices will be in effect, but the window will fill the whole screen.  The user then shouldn't be able to change window mode to "maximize", "close", or anything else unless they use your command buttons.  Let us know if that helps.
good luck as usual...
0

Featured Post

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
In Part II of this series, I will discuss how to identify all open instances of Excel and enumerate the workbooks, spreadsheets, and named ranges within each of those instances.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…

728 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question