Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 308
  • Last Modified:

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

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
Patrick O'Dea
Asked:
Patrick O'Dea
  • 7
  • 7
  • 5
  • +1
2 Solutions
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Has *anything* change on the client's system regarding Office and/or Windows - updates, new versions, etc?

mx
0
 
Patrick O'DeaAuthor Commented:
I will check with them mx.

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

(tough question I know).
0
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
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
Veeam and MySQL: How to Perform Backup & Recovery

MySQL and the MariaDB variant are among the most used databases in Linux environments, and many critical applications support their data on them. Watch this recorded webinar to find out how Veeam Backup & Replication allows you to get consistent backups of MySQL databases.

 
joinaunionCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"The database is not split (yet)."

It may be time :-)

mx
0
 
Patrick O'DeaAuthor Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
 
Patrick O'DeaAuthor Commented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
 
PatHartmanCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
Pat ... this is why I asked above if *anything* has changed on the client's system regarding Windows and/or Office :-)

mx
0
 
PatHartmanCommented:
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
 
Patrick O'DeaAuthor Commented:
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
 
PatHartmanCommented:
@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
 
Patrick O'DeaAuthor Commented:
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
 
PatHartmanCommented:
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
 
Patrick O'DeaAuthor Commented:
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
 
PatHartmanCommented:
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
 
DatabaseMX (Joe Anderson - Microsoft MVP, Access and Data Platform)Commented:
"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
 
Patrick O'DeaAuthor Commented:
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

NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

  • 7
  • 7
  • 5
  • +1
Tackle projects and never again get stuck behind a technical roadblock.
Join Now