A
Ajandco
I have a problem very similar to one recently described on Access Monster. A
solution was proposed that apparently worked. Unfortunately my command of
VBA is not yet up to the previously answer.
My database opens using a shortcut from the desktop to FrmStartup. FrmStartup
form calls another routine which does some calculations then tries to exit
the application. The application appears to close however, unfortunately a
copy of Access shows up in the processes list for each time I open and close
the application and doesn't appear in the applications list. While this in
itself doesn't cause any problems, whenever the screensaver cuts in during
the day, each hidden copy of Access that was 'running' causes a "Microsoft
Access has experienced a problem...". not a very elegant screen for users to
open up to, 4 or five failed application occurances!
I know the shortcut is part of the problem - if I open the database by
specifying FrmStartup in the Tools Startup Options the problem does not occur.
Unfortunately I have other reasons for starting the database using the
shortcut and I need to keep the current startup method.
The solution that was described previously was "parameter for LoadForm
defined as ByRef (or not declared,which is implicitly ByRef)? Try doing it
with ByVal" is a bit obscure to me.
The FrmStartup coding (which fails to properly close down Access) is simply:
Option Compare Database
Private Sub Form_Open(Cancel As Integer)
Call CalculationRoutine 'the calculations are carried out here
Do Until Forms.Count = 0
DoCmd.Close acForm, Forms(0).Name
Loop
DoCmd.Quit acQuitSaveNone
End Sub
Could you please oblige by giving me an idea as to how to apply the solution
previously described?
Many thanks
Alastair
solution was proposed that apparently worked. Unfortunately my command of
VBA is not yet up to the previously answer.
My database opens using a shortcut from the desktop to FrmStartup. FrmStartup
form calls another routine which does some calculations then tries to exit
the application. The application appears to close however, unfortunately a
copy of Access shows up in the processes list for each time I open and close
the application and doesn't appear in the applications list. While this in
itself doesn't cause any problems, whenever the screensaver cuts in during
the day, each hidden copy of Access that was 'running' causes a "Microsoft
Access has experienced a problem...". not a very elegant screen for users to
open up to, 4 or five failed application occurances!
I know the shortcut is part of the problem - if I open the database by
specifying FrmStartup in the Tools Startup Options the problem does not occur.
Unfortunately I have other reasons for starting the database using the
shortcut and I need to keep the current startup method.
The solution that was described previously was "parameter for LoadForm
defined as ByRef (or not declared,which is implicitly ByRef)? Try doing it
with ByVal" is a bit obscure to me.
The FrmStartup coding (which fails to properly close down Access) is simply:
Option Compare Database
Private Sub Form_Open(Cancel As Integer)
Call CalculationRoutine 'the calculations are carried out here
Do Until Forms.Count = 0
DoCmd.Close acForm, Forms(0).Name
Loop
DoCmd.Quit acQuitSaveNone
End Sub
Could you please oblige by giving me an idea as to how to apply the solution
previously described?
Many thanks
Alastair