Distribute MS Access 97 Application

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

We use ODE to distribute MS Access 97 Application to users
who doesn't have MS Access installed on their machines.
The database is split to front end and back end.

After inputting data and close all the forms, when they
clik the "Exit Application" Button, they get the "You must
either save or disgard changes to the open object".

Is there any suggestion ?
 
We use ODE to distribute MS Access 97 Application to users
who doesn't have MS Access installed on their machines.
The database is split to front end and back end.

After inputting data and close all the forms, when they
clik the "Exit Application" Button, they get the "You must
either save or disgard changes to the open object".

Is there any suggestion ?

Sounds like some Form or Report was opened in design mode, and needs
to be closed using the acSaveNo parameter. Could you post the code
being exicuted by the Exit button?
 
Dear John,

Thank you for your reply. How do I find that in which mode
do I open the form ?

Code is as follow:

Private Sub Exit_Microsoft_Acces_Click()
' Close all open database objects, and then exit
application.
'
' Turn on error trapping.
On Error GoTo ErrHandler

Dim Tmp As Variant
Dim ReturnValue As Integer

Tmp = CloseObject("Tables", A_TABLE)
Tmp = CloseObject("Tables", A_QUERY)
Tmp = CloseObject("Forms", A_FORM)
Tmp = CloseObject("Reports", A_REPORT)
Tmp = CloseObject("Scripts", A_MACRO)
Tmp = CloseObject("Modules", A_MODULE)

' Exit application.
DoCmd.DoMenuItem 1, 0, 2, , A_MENU_VER20

Exit Sub

' Branch here if error occurs.
ErrHandler:
MsgBox "You must either save or discard changes to the
open object.", 48, "Must Close Object"
Resume Next

End Sub
 
Thank you for your reply. How do I find that in which mode
do I open the form ?

Code is as follow:

Private Sub Exit_Microsoft_Acces_Click()
' Close all open database objects, and then exit
application.

In Access97 I've never had problems with simply

Private Sub Exit_Microsoft_Access_Click()
DoCmd.Quit
End Sub
 
Back
Top