solar - here is an article about 'trapping' and disabling the x that
closes access:
http://www.mvps.org/access/general/gen0005.htm
And if you want to make it go away completely, here is the code that I
use, that I got from this newsgroup - (I use it in Access 2002, with XP.
I'm not sure if it will work with new stuff like vista and 2007):
'\***BEGIN CODE***\
Private Declare Function GetSystemMenu Lib "user32" (ByVal hWnd As Long, _
ByVal bRevert As Long) As Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long, _
ByVal nPosition As Long, ByVal wFlags As Long) As Long
Function fNoExitBtn(lngH Wind As Long)
'\(c)silba,0408 99\vs.01.02\rev 060100\
On Error Resume Next
Dim lngSysMenu As Long
Dim lngRes As Long
Const MF_BYPOSITION = &H400
lngSysMenu = GetSystemMenu(l ngHWind, 0)
lngRes = RemoveMenu(lngS ysMenu, 6, MF_BYPOSITION)
End Function
'when you want to hide the close button, you call the function like this:
fNoExitBtn(hWnd AccessApp)
-hope this helps
-John
solar wrote:
How can I remove the three buttons on the upper right corner in the
database ? These three buttons are called "minimize" "restoredown"an d
"close". With the command
Application.Com mandBars("Menu bar").Enabled = False
With the help of the above command remove all the buttons and the
screen is clear of them, but these three buttons remain on the right
upper corner. Is there any command with which to remove them by
code ?
In the design view of the form i have put No to the properties
ControlBox,MinM ax button
and CloseButton but these buttons persist to stay at the upper right
corner of the screen. perhaps they are tied up not with Acces but with
Windows ?