Strange error : Occurs on client site but not on my PC

Posted on 2014-04-25
Medium Priority
Last Modified: 2014-04-27
See error


This occurs in my 2007 Access Database on the CLIENT site.
However, it DOES not occur when the client emails the database to me.
The database is not split (yet).

Note that the database has been working fine for over a year.

I appreciate that this is very little information but perhaps someone can comment on the nature of the error.
Question by:Patrick O'Dea
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 7
  • 5
  • +1
LVL 75
ID: 40023556
Has *anything* change on the client's system regarding Office and/or Windows - updates, new versions, etc?


Author Comment

by:Patrick O'Dea
ID: 40023568
I will check with them mx.

Is it possible (likely) that the fault is NOT in my access database?

(tough question I know).
LVL 75
ID: 40023575
Well, if all of a sudden the app breaks w/o any changes you've made ... then to me it indicates an change on the client's end ...

Can you remote and examine the db 'live' ?

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

LVL 16

Expert Comment

ID: 40023600
Did someone change the code for how many times post comment button is pressed/clicked?

Can you show us the code for your post button?
LVL 75
ID: 40023613
"The database is not split (yet)."

It may be time :-)


Author Comment

by:Patrick O'Dea
ID: 40023616

since the users environment is largely out of my control ...... can I do anything to reduce the risk??

What about if I save under a different version of Access?
Also , I will finally split the database?

Can I do anything else?
(I have removed redundant files and compact and repaired etc).
LVL 75

Accepted Solution

DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform) earned 1000 total points
ID: 40023634
"can I do anything to reduce the risk??'

OK ... so you are saying you cannot remote and trap the error live ?

If not then I assume you can send a new version. If so I would do these steps on your development system:

1. Be absolutely sure there are *no* compile errors in your  master copy.
Fix any errors ... then

2. Decompile then recompile. If you need the steps, let me know.

3. Compact & Repair.

4. Deploy to client site.

To avoid any additional confusion at the moment, I would hold off on splitting - until the steps above turn out not to resolve the issue.


Author Comment

by:Patrick O'Dea
ID: 40023649

It compiles fine and also compacts and repairs regularly.

Should I set the error trapping to "break on all errors"??

If you have a link to explain "decompile" then that would be handy.  If not then I can find it myself.
LVL 75
ID: 40023666
"Should I set the error trapping to "break on all errors"??"
Well ... that might help nail done exactly where the error is occurring ... but the client might freak out if seeing the code window, etc ... unless that's cool with them  ?  If you see what I mean.

Decompile Procedure:

Open the VBA Editor and from the menu ...Tools>>References ....
If you see any listed as **Missing: <reference name>, including the asterisks and the word Missing, the
you need to fix that first.

Then, follow this procedure:

0) **Backup your MDB BEFORE running this procedure**
1) Compact and Repair the MDB, as follows:
Hold down the Shift key and open the MDB, then from the menu >>Tools>>Database Utilities>>Compact and Repair ...
Close the mdb after the Compact & Repair.
2) Execute the Decompile (See example syntax below) >> after which, your database will reopen.
3) Close the mdb
4) Open the mdb and do a Compact and Repair (#1 above).
5) Close the mdb.
6) Open the mdb:
    a) Right click over a 'blank' area of the database window (container) and select Visual Basic Editor. A new window will open with the title 'Microsoft Visual Basic' ... followed by then name of your MDB.
    b) From the VBA Editor Menu at the top of the window:
        Note ... after the word Compile ...you will see the name of your 'Project' - just an fyi.

7) Close the mdb
8) Compact and Repair one more time.

*** Executing the DeCompile **EXAMPLE**:
Here is an **example** of the command line syntax  (be SURE to adjust your path and file name accordingly) before executing the decompile:

Run this from Start>>Run, enter the following command line - **all on one line** - it may appear like two lines here in the post:
Also, the double quotes are required.

"C:\Program Files\Microsoft Office\Office\Msaccess.exe" /decompile "C:\Access2003Clients\YourMdbNameHERE.mdb"
LVL 39

Assisted Solution

PatHartman earned 1000 total points
ID: 40023683
Frequently when an app works on one PC but not another, the problem is references.  If the client has a full version of Access, then when you remote in, you can  force the app to break when it gets the error.  Stop the code from running and examine the references to see if any is marked as MISSING.  Also compile the app while you have the code window open.

If a reference is missing, you can just delete it if you are sure you don't need it.  Then recompile again.  If you need the library, then you are going to have to install the library on the client PC.   If the missing reference is part of Office, you are probably running into a version issue.  If you can't develop in the same version as the client, you will need to switch your code to use "late binding" rather than "early binding".  That way Access won't try to open the library until you actually use it and Access will use a generic reference rather than a specific one.  For example, if you are developing in O2010, then your app will ship with references to O2010 products but if your client has O2007, the code won't work.  Access is able to "promote" references (i.e. move up versions) but not "demote" references (move down versions).
LVL 75
ID: 40023688
Pat ... this is why I asked above if *anything* has changed on the client's system regarding Windows and/or Office :-)

LVL 39

Expert Comment

ID: 40023745
I understand why you asked but it is not always easy to get a straight answer from a client:)  so I thought I would explain to the OP how to figure out for himself if there is a missing reference.

Author Comment

by:Patrick O'Dea
ID: 40024168
Thanks for great responses.

Before I close the questions.

One further clarification.

I will check the "references" for "Missing" ones.

Do I assume if there are NO missing references that the problem does is not in the "reference" area.   I.e No Missing references means that that references are fine ??
LVL 39

Expert Comment

ID: 40024695
@Joe - I see your confusion now.  I didn't notice your detail message.  You must have posted it while I was typing.

@21Dewsbury - if no reference is marked MISSING and everything compiles, the problem is not a missing reference but corruption now becomes the leading suspect.  Start by replacing the file at the client site with a new one.  Joe's explanation about Decompile should help you eliminate any corruption.  Usually compact and repair and decompile will exorcise any stray pcode that might be corrupted although, in several cases, I have actually had to run the decompile multiple times.  If you still are getting errors, you can try recreating the entire database.  Create a new empty database and then import all the objects into it.  Don't forget to set any references and start up options.  Sometimes this process will fail at the corrupted object (good thing - because now it is identified).  Just bypass it and import everything else.  Worst case is you have to recreate the object from scratch.  You should still be able to copy and paste the code module.  Paste it into notepad first because that absolutely strips Access "stuff" that you might get if you copied Access object to Access object.

Author Comment

by:Patrick O'Dea
ID: 40024799
Pat, thanks,
(I will get to try out these options when I talk to the client on Monday)

You say "Start by replacing the file at the client site with a new one."
I am not sure what this means.

I should advise that about 10 days ago I "rebuilt" the database by creating a new one and importing everything into it.

It could well be a "reference" issue and I will check this with the client.

Thanks again,
Padraig (!)
(which is the Irish version of the name Patrick)
The whole "21Dewsbury" is an unfortunate choice I made when I thought my EE login was a short term thing.
LVL 39

Expert Comment

ID: 40024811
Start by replacing the file at the client site with a new one
Send the client a fresh copy of the FE after you've done all the compacting/decompiling/etc.

Author Comment

by:Patrick O'Dea
ID: 40024874
Earlier it was mentioned about the possibilty of "missing" references.

I was advised to simply delete the missing one "If I do Not Need it".

How do I know if I need it?
I did nothing to the libraries in the first place.

(As usual, excuse my ignorance!)
LVL 39

Expert Comment

ID: 40025048
Sometimes libraries get added because you tried something and then decided not to use it.  You may remove the code but the reference remains.
LVL 75
ID: 40025260
"Do I assume if there are NO missing references that the problem does is not in the "reference" area.   I.e No Missing references means that that references are fine ??"

If there is a Reference issue (missing) ... it will show as follows:

**MISSING <SomeReferenceNameHere>  
(yes, the asterisks will be show)
Now ... this is only like to be the case IF ... the client has upgraded to a newer version of Office/Access or possibly Windows.  So, if by chance these IS a missing Reference, you will need to resolve that. But I see this as not likely given what we know so far.

"How do I know if I need it?"
If there is a missing Reference ... then when you compile, IF ... it's actually need (still) ... you will get a compile error related to that Reference.

It's also possible to have a missing reference and not get a direct compile ... for example if you were using the older Calendar control - and a newer version of Access (say 2010) was installed - which no long supports that calendar.  In this case, you might get an error similar to what is happening now. But this is all speculation.,

"(As usual, excuse my ignorance!)"
No worries. None of this stuff is straight forward :-)

Check for missing references. If found, resolve. If not, do the full on Decompile procedure, the deploy the 'new' version to the client ... and we'll go from there.


Author Closing Comment

by:Patrick O'Dea
ID: 40025448
Thanks for the great answers.

I will be talking to client in the next 48 hours and will update the question with my findings/results.

Featured Post

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question