MDE working but not MBD

Freshman

Registered User.
Local time
Today, 10:08
Joined
May 21, 2010
Messages
437
Hi all, yes is is not a spelling mistake...
MDE is working but not MDB

Since Friday I've been getting really weird errors when I run code that have been working for years.
Even compiling the code works.
I can then make a mde file and run it without problem but when I try to open my mdb file, it gives me these errors (not error messages as such, but break in code where there is not problem that I can see).

So I re-installed Access 2003 Pro but that didn't work.
I tried on another machine and the app works fine.
I then run it on my PC in Access 2010 and that too runs fine.

I must have un-installed and re-installed Access 2003 many times but still doesn't come right.

I checked references and that too seems fine.

Could this be a Win7 error?
Before I go the re-install O/S path I want to check it anyone ever got this before.

Forgot to say that I also tried some of my backup files as I do backups daily and date them, so I have copies of my app going back about 2 years.

Thanks
Pierre
 
So what is the error condition/symptoms?


"when I try to open my mdb file, it gives me these errors "

Which errors? What do you do exactly and what happens exactly?
 
>>>it gives me these errors (not error messages as such, but break in code where there is not problem that I can see).<<<

Do you have error handling code in your DB? If not please add error handling code. Code like the following will show you the procedure that is causing the problem.

Here's a Sample:-

Code:
Private Sub Command0_Click()
Dim strSubName As String
Dim strModuleName As String
strModuleName = "PLEASE Set the MODULE NAME"

strSubName = "Your/Sub Function Name HERE!" 'CHANGE THIS
'Uncomment an USE "ONE" of these
'strModuleName = "Form - " & Me.Name         'If a Form Sub/Function use this
'strModuleName = "Your Module Name HERE!"    'If a module use this

On Error GoTo Error_Handler


        'Code goes HERE


Exit_ErrorHandler:
    'adoCon.Close
    'Set adoCon = Nothing
    'Set adoCmd = Nothing
    
    Exit 'Function 'Sub 'Property 'uncomment the correct one

Error_Handler:
        Select Case Err.Number
            Case 1 'When Required, Replace Place Holder (1) with an Error Number
                MsgBox "Error produced by Place Holder please check your code !  Error Number >>>  " _
                & Err.Number & "  Error Desc >>  " & Err.Description ', , conAppName
            Case Else
                MsgBox "Error From --- " & strModuleName & ", " & strSubName & " --- Error Number >>>  " & Err.Number _
                & "  <<< Error Description >>  " & Err.Description ', , conAppName
        End Select
    Resume Exit_ErrorHandler

End Sub
 
Do you have error handling code in your DB? If not please add error handling code.

Nothing to gain adding more error handling when the problem is running the mdb. In fact, for diagnosis you want to stop all error handling and see it break on the line the where it fails.

The easiest place to do this is in the VBA editor > Tools > Options > General > Break on All Errors.
 
>>>nothing to gain....<<<

I know what you mean, but where else to start?

I would also suggest, copy everything in to a new db.

Make sure you got option explicit every where.
 
The OP says it is a problem on just one computer and the database has worked for years and still is a problem after reinstalling Access.

My guess it is a permissions problem on the mdb file or folder the mdb is located in. The folder will need write permission for the lock file.
 
The OP says it is a problem on just one computer and the database has worked for years and still is a problem after reinstalling Access.

My guess it is a permissions problem on the mdb file or folder the mdb is located in. The folder will need write permission for the lock file.

@Galaxiom - thanks for clarifying my OP - yes this just happend all of a sudden from working db. So something is fishing. I tried as Uncle Gizmo suggested pulling everything into a brand new db but that gave the same errors.

To clarify the errors: It would debug in code that there is nothing wrong. Code that has been running unchanged for years and multiple clients.
When I remove the debug line, it simply stops at the next line. Even simple msgbox lines.
Since the problem is only on my own PC and not on the other PC I tried, I keep narrowing it down to this PC and possibly a O/S problem since re-installing Office doesn't work.

Seems like I'll have to book my PC in for a re-install - something I hate doing.
Will feedback,

Thanks again. First time in 15 years I see something like this...
 
@spikepi - wow that is intresting - never heard about the "phantom break point".
I tried the solution just now but it doesn't resolve it.

To give you some sort of example - the code doesn't care if you put in lines line:
On Error Resume Next
It simply ignores it and still stops at the line following it.

Even where I have "overkill" error handling of a piece of code (which ran unchanged for years)at the beginning of a function to catch-all errors in order to jump to the end of the function and then simply exits, it ignores the error handling totally and still stops at a line within the code

But on another PC the code runs fine.
I have my PC booked for a re-load of Win7 for tomorrow and I really hope it solves the problem
 
Hi all,
Just some feedback. Re-installed Win7 and everything working again as normal.
The bad thing now is that we will never know what the actual problem was.
It might have been some small missing/corrupt O/S file which could have been fixed without a re-install of O/S
I'm just glad that it solved the problem.
Now for getting everyting back from the backups etc....gggrrr...the joys of a re-install

Thanks to everyone for their input.
 

Users who are viewing this thread

Back
Top Bottom