Can’t make MDE with App Close Button Disabled.

L

Liz James

On my app, the application close button is disabled, and to Exit the app, the
user must click the Exit button on the Main Switchboard.

When I try to convert this app to an Mde file, the conversion fails because
the application won’t close when the convert to Mde process starts. If I
close the app from the Main Switchboard, I don’t have access to the Database
Utilities on the Tools menu, so can’t convert to Mde, and it goes in circles
like this.

Is there other way to have the app close button disabled with an Mde file?
 
D

Dirk Goldgar

Liz James said:
On my app, the application close button is disabled, and to Exit the
app, the user must click the Exit button on the Main Switchboard.

When I try to convert this app to an Mde file, the conversion fails
because the application won't close when the convert to Mde process
starts. If I close the app from the Main Switchboard, I don't have
access to the Database Utilities on the Tools menu, so can't convert
to Mde, and it goes in circles like this.

Is there other way to have the app close button disabled with an Mde
file?

Does holding down the Shift key as you open your database disable the
startup code and allow you to close it from the regular "X" application
close button?

If not, and if you haven't given yourself a way to get back in, you
could try making the MDE from a separate, external database. With your
application closed (but compiled), open a new blank database or a
utility database -- NOT your application database -- paste the following
procedure into a standard module and run it:

'----- start of code -----
Sub MakeMyMDE()

Dim accApp As Access.Application

Const PathToMDB As String = "C:\Your Path\YourApp.mdb"
Const PathToMDE As String = "C:\Your Path\YourApp.mde"

Set accApp = New Access.Application

accApp.SysCmd 603, PathToMDB , PathToMDE

accApp.Quit

Set accApp = Nothing

End Sub
'----- end of code -----

If that doesn't work, you may have to build an escape condition into
your application so that you can get in while allowing a normal close
process.
 
Top