View Single Post
  #2  
Old December 24th, 2008, 11:10 PM posted to microsoft.public.access,microsoft.public.access.forms,microsoft.public.access.modulescoding
Robert Morley[_2_]
external usenet poster
 
Posts: 13
Default A2K Runtime Crashes on DoCmd.Quit

Andy wrote:
Hi;

Using A2K Runtime on XP Pro PC. Have all of the updates for XP and Access
Runtime including SP-3 for both.

The app opens to frmLogin correctly. On that form there are 2 cmd buttons.
Continue & Exit.

Can log in as USER or sa, (System Administrator) but when clicking either
cmd button get Access Runtime Crash.

"Execution of this application has stopped due to a run-time error."
"The application can't continue and will be shut down."
Only has OK button.

The cmdExit OnClick Event is:
Private Sub cmdExit_Click()
DoCmd.Quit
End Sub

Don't understand why would get a run-time error on DoCmd.Quit.

The MDB does work correctly on the machine that created it. Even opening it
as the User in Runtime Version emulation.

This Computer's Shortcut for Runtime test Target: "C:\Program
Files\Microsoft Office\Office\MSACCESS.EXE" "C:\CoDBase\CoDBase.mdb" /WRKGRP
"C:\CoDBase\Secured.mdw" /runtime /excl
Start In: C:\CoDBase\

On computer with only Access Runtime:
Shortcut Target: "C:\Program Files\Microsoft Office\ART\Office\MSACCESS.EXE"
"C:\CoDBase\CoDBase.mdb" /WRKGRP "C:\CoDBase\Secured.mdw" /excl
Start In: C:\CoDBase\

The permissions for frmLogin is:
sa = Open/Run, Read Design, Modify Design & Administer.

For the User: Open/Run

The User has permissions to Open / Run and Open Exclusive for the Current
Database.
Already re-ran Security Wizard. Thought maybe Secured.mdw was corrupt.

Would someone be so kind and point me in the proper direction to overcome
this obstacle?

Thank You for taking the time to read this post.

Andy


I remember having some really wonky conditions in A2K under which the app
would crash when closing, though they weren't identical to your, since I
remember it only occurred when closing the form with the X but would work
fine from a command button.

First of all, try this under XP/2003/2007 if you have any of those
available, just to see if it works there or not. Mine worked under all
future versions and only failed under 2000 (never tried the runtime version,
mind you).

What I would try next are "stupid" workarounds...for instance, from your
Click procedure, call a sub that'll close the form (or maybe all forms),
loop in a DoEvents loop for half a second, then quit. See if there's
anything of that nature that works for you. Failing that, try using the
Windows API to close your app and see if that works (I don't remember
exactly how to do that, but I know it's not hard...I'm sure someone can post
it if you need).

Good luck!


Rob