Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Removing Close button on MS Access

61 views
Skip to first unread message

M P

unread,
Aug 22, 2003, 9:01:23 PM8/22/03
to
Hi!

I already remove the close button on my forms. Is there a way that I will
also remove the close button, or the whole control of the main MS access
program?

Mark


Paul Overway

unread,
Aug 22, 2003, 9:32:46 PM8/22/03
to
The more important question is why would you want to? If you are trying to
force something to occur before Access closes, create a hidden form and put
your code in the Unload event for that form.

--
Paul Overway
Logico Solutions, LLC
www.logico-solutions.com


"M P" <ma...@textguru.ph> wrote in message
news:#k35fIRa...@TK2MSFTNGP09.phx.gbl...

Van T. Dinh

unread,
Aug 22, 2003, 9:56:37 PM8/22/03
to
The answer is no unless you want to hide the Access application window but
there are complications with hiding the Access application window.

But like Paul wrote, you can render the Close button of the Access
application window ineffective.

--
HTH
Van T. Dinh
MVP (Access)

"M P" <ma...@textguru.ph> wrote in message
news:#k35fIRa...@TK2MSFTNGP09.phx.gbl...

Arvin Meyer

unread,
Aug 23, 2003, 9:09:42 AM8/23/03
to
There is a method, using several api's, that will disable, not remove, the
Close button, but I'd advise against doing anything to frustrate users. You
will lose the battle and wind up with a corrupt database.

The "trick" is to decide what your goal is and see how you can work
positively toward it.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access

"M P" <ma...@textguru.ph> wrote in message
news:#k35fIRa...@TK2MSFTNGP09.phx.gbl...


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.512 / Virus Database: 309 - Release Date: 8/19/2003


david epsom dot com dot au

unread,
Aug 23, 2003, 11:35:11 PM8/23/03
to
There are to methods
1) make the form maximised, popup,(modal?) so that it covers the whole
screen
2) Hide the access window:
http://www.mvps.org/access/api/api0019.htm


(david)


"M P" <ma...@textguru.ph> wrote in message

news:%23k35fIR...@TK2MSFTNGP09.phx.gbl...

M P

unread,
Aug 25, 2003, 3:09:36 AM8/25/03
to
Hi Paul,

THanks for the reply. The thing is this, I want my user to use the logoff
button that I made on my form instead of clicking the X button (close
button) of the Main MS Access Window. How can I do this? Please Help!

Mark

"Paul Overway" <pa...@no-spam-logico-solutions.com> wrote in message
news:OpfCoZRa...@TK2MSFTNGP12.phx.gbl...

Paul Overway

unread,
Aug 25, 2003, 9:27:32 AM8/25/03
to
I'm repeating myself here. Create a hidden form that opens when your app
does. Put code in the Unload event for that form. When Access closes, your
code will execute. It won't matter whether your user clicked your button,
the code will execute before Access closes.

--
Paul Overway
Logico Solutions, LLC
www.logico-solutions.com


"M P" <ma...@textguru.ph> wrote in message

news:eIVHnfta...@TK2MSFTNGP10.phx.gbl...

M P

unread,
Aug 26, 2003, 3:29:22 AM8/26/03
to
Sorry but I need help. Can you give me a sample code so that I may use it as
a pattern.

I forgot to tell you that I am new to access and VB programming.


"Paul Overway" <pa...@no-spam-logico-solutions.com> wrote in message

news:#Gv1Vywa...@TK2MSFTNGP10.phx.gbl...

John Vinson

unread,
Aug 26, 2003, 2:24:09 PM8/26/03
to
On Tue, 26 Aug 2003 15:29:22 +0800, "M P" <ma...@textguru.ph> wrote:

>Sorry but I need help. Can you give me a sample code so that I may use it as
>a pattern.

Create a Form named frmStartup. It should be unbound (not based on any
table), and its Visible property should be False - you just want the
form hanging around in the background, not visible.

In its Close event put code like

Public glbOKToClose as Boolean
Private Sub Form_Close(Cancel as Integer)
If glbOKToClose = False Then
"Please close the database using the Exit button", vbOKOnly
Cancel = True
End If
End Sub

Then, in the code to your Exit button, set glbOKToClose to True.

John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public

Van T. Dinh

unread,
Aug 26, 2003, 7:10:27 PM8/26/03
to
John

I think you meant the Unload Event (which is cancellable) and not the Close
Event.

--
HTH
Van T. Dinh
MVP (Access)

"John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message
news:v79nkvkithe2s2g29...@4ax.com...

John Vinson

unread,
Aug 26, 2003, 8:07:15 PM8/26/03
to
On Wed, 27 Aug 2003 09:10:27 +1000, "Van T. Dinh"
<VanThi...@PlseUseNewsgroup.bigpond.com> wrote:

>John
>
>I think you meant the Unload Event (which is cancellable) and not the Close
>Event.

Thanks Van... quite correct!

Ian Baker

unread,
Aug 27, 2003, 12:53:03 AM8/27/03
to
Sorry to be the bearer of bad news guys but you can by using api's remove
all items (close, minimise, maximise & icon) in the Access application
window title bar. In fact the Access Desktop Developer's Handbook has a
class that will show you as well. FWIW

--
Regards

Ian Baker
Jackaroo Developments Pty Ltd
Download Jackaroo (an IT Help Desk application) at Web:
http://jackaroo.net.au


"M P" <ma...@textguru.ph> wrote in message

news:%23k35fIR...@TK2MSFTNGP09.phx.gbl...

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).

Version: 6.0.509 / Virus Database: 306 - Release Date: 12/08/2003


Test_joby

unread,
Aug 28, 2003, 2:23:34 AM8/28/03
to
fdjgk dkgsdfg

testing only

"John Vinson" <jvinson@STOP_SPAM.WysardOfInfo.com> wrote in message

news:8htnkvonkge5imags...@4ax.com...

0 new messages