Solved

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

Posted on 2014-04-25
20
284 Views
Last Modified: 2014-04-27
See error

http://screencast.com/t/mLKiHxwWbBny

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.
0
Comment
Question by:Patrick O'Dea
  • 7
  • 7
  • 5
  • +1
20 Comments
 
LVL 75
ID: 40023556
Has *anything* change on the client's system regarding Office and/or Windows - updates, new versions, etc?

mx
0
 

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).
0
 
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' ?

mx
0
 
LVL 16

Expert Comment

by:joinaunion
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?
0
 
LVL 75
ID: 40023613
"The database is not split (yet)."

It may be time :-)

mx
0
 

Author Comment

by:Patrick O'Dea
ID: 40023616
mx,

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).
0
 
LVL 75

Accepted Solution

by:
DatabaseMX (Joe Anderson - Access MVP) earned 250 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.
>>VBA>>Debug>>Compile.
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.

mx
0
 

Author Comment

by:Patrick O'Dea
ID: 40023649
mx,

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.
0
 
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:
       >>Debug>>Compile
        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"
0
 
LVL 34

Assisted Solution

by:PatHartman
PatHartman earned 250 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).
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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 :-)

mx
0
 
LVL 34

Expert Comment

by:PatHartman
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.
0
 

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 ??
0
 
LVL 34

Expert Comment

by:PatHartman
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.
0
 

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.
0
 
LVL 34

Expert Comment

by:PatHartman
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.
0
 

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!)
0
 
LVL 34

Expert Comment

by:PatHartman
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.
0
 
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 ??"

VBA>>Tools>>Reference
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 :-)

Summary:
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.

mx
0
 

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.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
Today's users almost expect this to happen in all search boxes. After all, if their favourite search engine juggles with tens of thousand keywords while they type, and suggests matching phrases on the fly, why shouldn't they expect the same from you…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

762 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now