Bilbo_Baggins_Esq
Registered User.
- Local time
- Today, 09:28
- Joined
- Jul 5, 2007
- Messages
- 586
Please read my post carefully.
I know the users below were genuinely trying to assist, but trust me, I ALREADY KNOW HOW TO FIX THE CAUSES OF THE ERROR.
The purpose of this thread is NOT to fix the causes, but to manage the ORIGINAL ACCESS error.
I have a database that is being opened programmatically with VBA in an Access.Application object
During the opening process, an error is fired, apparently by Access or DAO.
If you answer NO, it just keeps firing until you click YES.
After you click YES, it does finally fire a VBA error which my error handler does pick up:
First I get:
I did some diagnostics to confirm this and am satisfied with my understanding of that.
If it were in my purview, I could very easily fix the problem with the module (and actually already have fixed it) and all these errors go away.
HOWEVER, (and this is what may seem odd to some here), it is not my purview to perform that service!
I am not concerned about what I learned to confirm there is a problem with the module.My code is only opening the database to capture a few specific properties.
Since I am not the “owner” of to DB, it is not necessarily my place to perform any edits or make any changes.
My purpose is only to capture these few OTHER attributes and report the findings.
And yes, now that I have discovered the risk/opportunity to report back regarding possible Module corruption, I will add that to the other attributes I cheeck.
but still it remains, not the purpose of the tool to perform any remediation or edits or repair.
So, now my problem:
How can I handle that very original error?
If I can suppress it, or get past it, my VBA error handling should work just fine and even make note of the corruption error (even thought that was not necessarily part of my original quest).
To be clear, the two VBA Errors ARE NOT my challenge here.
The real problem is, I can’t find a way to programmatically manage that very first error from Access or DAO (suspect Access since it is caused by the VBA).
The error fires completely while inside either one of these two specific lines:
Or
Is there a way to turn off Access or DAO Errors without impacting VBA Error reporting?
Is there some tricky or sneaky way you guys might know to provide a “yes” answer to the dialog?
Programmatically, I see this is a problem because it never really gets out of either of those two lines while the error dialog is open?
As always, any help or tips or suggestions or hints will be deeply appreciated.
I know the users below were genuinely trying to assist, but trust me, I ALREADY KNOW HOW TO FIX THE CAUSES OF THE ERROR.
The purpose of this thread is NOT to fix the causes, but to manage the ORIGINAL ACCESS error.
I have a database that is being opened programmatically with VBA in an Access.Application object
During the opening process, an error is fired, apparently by Access or DAO.
I cannot break into the code and appear unable to capture an error number from it.An error occurred while loading ‘Form_...
Do you want to continue loading the project?
Yes | No |Help
If you answer NO, it just keeps firing until you click YES.
After you click YES, it does finally fire a VBA error which my error handler does pick up:
First I get:
Then I get:29070 – Your Microsoft Access database or project contains a missing or broken reference to the file ‘MSCAL.OCX’ version 7.0
I have investigated this in more detail and apparently there is some real problem with the VBA module associated with the form mentioned in the original error.29063 – The Visual Basic for Applications project in the database is corrupt.
I did some diagnostics to confirm this and am satisfied with my understanding of that.
If it were in my purview, I could very easily fix the problem with the module (and actually already have fixed it) and all these errors go away.
HOWEVER, (and this is what may seem odd to some here), it is not my purview to perform that service!
I am not concerned about what I learned to confirm there is a problem with the module.My code is only opening the database to capture a few specific properties.
Since I am not the “owner” of to DB, it is not necessarily my place to perform any edits or make any changes.
My purpose is only to capture these few OTHER attributes and report the findings.
And yes, now that I have discovered the risk/opportunity to report back regarding possible Module corruption, I will add that to the other attributes I cheeck.
but still it remains, not the purpose of the tool to perform any remediation or edits or repair.
So, now my problem:
How can I handle that very original error?
If I can suppress it, or get past it, my VBA error handling should work just fine and even make note of the corruption error (even thought that was not necessarily part of my original quest).
To be clear, the two VBA Errors ARE NOT my challenge here.
The real problem is, I can’t find a way to programmatically manage that very first error from Access or DAO (suspect Access since it is caused by the VBA).
The error fires completely while inside either one of these two specific lines:
Code:
With AccessObj
.Visible = False
[COLOR="Red"].Application.ConvertAccessProject AccessPathIn, AccessPathOut, 12[/COLOR]
.Application.DoCmd.Quit
End With
Code:
With AccessObj
.Visible = False
.VBE.MainWindow.Visible = False
[COLOR="red"].OpenCurrentDatabase AccessPathIn, True[/COLOR]
.Application.DoCmd.Minimize
End With
Is there some tricky or sneaky way you guys might know to provide a “yes” answer to the dialog?
Programmatically, I see this is a problem because it never really gets out of either of those two lines while the error dialog is open?
As always, any help or tips or suggestions or hints will be deeply appreciated.
Last edited: