question

JoaoSimplicioRodrigues avatar image
0 Votes"
JoaoSimplicioRodrigues asked ·

VBA Access Stop Command

Hi all
Since I have installed O365 2016 when I use the command Stop to break execution Access close throw the message:

Microsoft Access has stopped working like in this image 66945-capture.png



Now with the 2008 Version the situation got worse because this happens every time that I have a vba error and click in Debug.

I've tried everything, Compact and Repair, decompile, a new database importing forms tables and modules, I checked the References in tha vba project.

Don't know more what to do

I'm using O365 Enterprise Version 2008 Build 13127.21064 (Click-to-Run)

Any hint or solution will be appreciated.

Thanks.

office-vba-devoffice-access-dev
capture.png (6.5 KiB)
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

You stated "...when I use the command Stop to break execution..."

What command are you using to "break execution"? What combination of key strokes are you using? What VBA code command are you using?

Please explain exactly what you are doing to "break execution".

0 Votes 0 ·
AlbertKallal-4360 avatar image
0 Votes"
AlbertKallal-4360 answered ·

Ok, how this works (or should work) has NOT changed - even going back to Acces 2000 (20 years ago!!!).

First up:

It is possible that you are launching a accDB (NOT an acDE) with the runtime. This is SUPER important detail (accDB vs compiled accDE).

With runtime + accDB

Any un-handled error or even a stop command - the error message comes up AND THEN the application shuts down - IN ALL CASES!

With runtime + accDE

Stop commands are ignored. Any un-handled error message can display a message, but hitting ok WILL CAUSE the code to continue. All local and global varibles WILL ALWAYS remain in tact - and errors will NOT stop nor shutdown the accDE. Again the context here is runtime version of Access.

The above behavior is the SAME for all versions of Access - no change to how this works for 20+ years.

so, it is possible (very likly) that you are running a accDB (NOT an accDE) with the runtime - and any error will and does cause the whole application to shut down in this case.

You can be double sure of this, by FIRST launching Access, and THEN opening the application in question. That way you can be 100% if not 200% sure you are launching + using the full edition of Access here. In some cases, you often will have installed the runtime version of Access, and thus your file extensions are hi-jacked. Thus you actually using the runtime version of Access and not the full version - and against a accDB (not a accDE), then the behavour you note is how this works - and has for a very long time.

Now the above might not be 100% the exact case you have, but being aware of the above behavour(s) will and can explain a lot of what you are seeing here.

So details of importance are:
Is this a accDB or accDE?
Are you using the Access runtime or not?

As noted, with Acces runtime, then accDB's will error out, and when they do - they shutdown Access. A accDE does NOT exhibit this behaour (with the runtime)

With full editon + accDB, then a stop or error should allow you to get the debug and VBA ide.

Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada




·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JoaoSimplicioRodrigues avatar image
0 Votes"
JoaoSimplicioRodrigues answered ·

Albert,

Thank you for reply.

I'm using accdb and (normal) Access within Office 365 suite.

I have used another workstation in my organization already with the O365 20 08 upgrade and created a new accdb.

I imported the >120 forms and 40 modules of the original accdb and so far so good. Seems to be okay.

I don't know if is is related but I already ask to reinstall the W10 and O365 in my workstation.

Thanks any way.

João.

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ok - just keep in mind that all important difference between using the free Access runtime to run a application, and the different behaviors of a accDB vs that of a accDE.

it thus seems then you are ALWAYS using a accDB. As noted, perhaps something was damaged, and your idea to import to a brand new database is a VERY good idea.

However, the behaviors you describe does suggest that a accDB was being run as a "runtime" on a workstation - since any errors will then show a error message and THEN shut down the application. If you use a accDE + runtime, or accDB + full edition of Access, the behaviors you describe should not have occurred.

Regards,

Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada

0 Votes 0 ·
JoaoSimplicioRodrigues avatar image
0 Votes"
JoaoSimplicioRodrigues answered ·

What about this...
In the new accdb, in the other machine.


67416-capture1.png



I force to get an error and have no chance to click on Debug !!


capture1.png (15.6 KiB)
· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ok, that seems like a different issue. Before you run the code, in VBA can you do a debug->compile?

I would try that. This does sound like a damaged accDB - but not all sure right now. I would try the debug->compile - see if that removes errors.
This also seems to suggest that perhaps you can't modify anything? Perhaps the accDB is in a folder with restricted rights?
(so can you freely modify forms and other code in this application? And before running code, does debug->compile in VBA go ok?

R
Albert

0 Votes 0 ·
JoaoSimplicioRodrigues avatar image
0 Votes"
JoaoSimplicioRodrigues answered ·

yes I do alt+ d and ctrl + s almost as an instinct.

My point isn't the error itself, as i mention I forced it.

My point is when I have an unhandled error, sometimes... and this is even worse not always,

Access stop instead of the "normal" options 67532-capture2.png


This never happened with 02010, just has started with O365 and now with the 20 08 upgrade became almost impossible to work...


67542-capture3.png



And I already Compact and Repair and use the /decompile option with this file and I'm using folder I create in the C: drive of my laptop...


capture2.png (1.9 KiB)
capture3.png (19.4 KiB)
·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

LarryEllefson-0526 avatar image
0 Votes"
LarryEllefson-0526 answered ·

It appears you are trying to set the Tag property of the lbl_CLIENTE control on the GRIP_DETALHE_CLIENTE form to .GRIPSILA.Value and I suspect ACCESS cannot determine what .GRIPSILA.Value is and causes the entire application to crash.

As a test, try setting the Tag value to "MyTag" to see if it still crashes.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JoaoSimplicioRodrigues avatar image
0 Votes"
JoaoSimplicioRodrigues answered ·

The problem isn't the code error itself !

The problem is I can't debug because ACCESS after 3 4 seconds crash without change of any action from me.

I have no chance, for instance, add a watch to check a value...

· 1 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

As noted, this is difficult to figure out.

Have you tried creating a new blank database, and then importing all the forms + code?
Does the new database code compile correctly?
Does the new database crash the same way?

Can you remove all code and JUST make a simple database with the 1-2 lines of code that crashes? If you can do that, then you can share that database with everyone here - and we might be able to figure this out.

Regards,
Albert D. Kallal (Access MVP 2003-2017)
Edmonton, Alberta Canada


0 Votes 0 ·
LarryEllefson-0526 avatar image
0 Votes"
LarryEllefson-0526 answered ·

It looks like it is crashing BEFORE it is getting to the Stop command. Try moving the Stop command (break point) to the beginning of the code and it should then start the debug process from the beginning of the code. Then you can step through each line (F8) to determine exactly where the code causes the application crash.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JoaoSimplicioRodrigues avatar image
0 Votes"
JoaoSimplicioRodrigues answered ·

Finally... I'm not the only one !

access-keeps-crashing-when-i-go-click-debug.308934

I wish I could do F8...

I reiterate this happens asynchronously. I mean it doesn't always happen and I don't know why.

The example of the Stop command is because it is the situation where it is repeated most often.

It is difficult to make the IT department aware of the error.

Thanks anyway.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

JoaoSimplicioRodrigues avatar image
0 Votes"
JoaoSimplicioRodrigues answered ·

I can now confidently state that this problem is exposed in the Windows Event Viewer report with the message:

Faulting application name: MSACCESS.EXE, version: 16.0.13127.21216, time stamp: 0x601ece88
Faulting module name: ntdll.dll, version: 10.0.18362.1350, time stamp: 0x37b70d07
Exception code: 0xc0150010
Fault offset: 0x00000000000ae600
Faulting process id: 0x375c
Faulting application start time: 0x01d714ebd7dc7ab8
Faulting application path: C:\Program Files\Microsoft Office\Root\Office16\MSACCESS.EXE
Faulting module path: C:\WINDOWS\SYSTEM32*ntdll.dll

Report Id: 84059b4b-1829-4c3b-8dce-9d6448eabe3e*


Faulting application name: MSACCESS.EXE, version: 16.0.13127.21348, time stamp: 0x604411ff
Faulting module name: OLEAUT32.dll, version: 10.0.18362.1377, time stamp: 0xfceac32c
Exception code: 0xc0000005
Fault offset: 0x000000000000d59d
Faulting process id: 0xdd4
Faulting application start time: 0x01d72fbc5899707e
Faulting application path: C:\Program Files\Microsoft Office\Root\Office16\MSACCESS.EXE
Faulting module path: C:\WINDOWS\System32*OLEAUT32.dll*
Report Id: 94c5aa79-2c2b-461d-9e8e-8090b7940915


I am now sure that the update to the 2008 version of Microsoft 365 Apps for enterprise (click-to Run) is at the origin of the problem.

Already make the application work with O2010 (just change the references for ACCESS / EXCEL / WORD) and no error happens





·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.