locked
Access 2003 db which acts corrupted, but isn't? RRS feed

  • Question

  • On one user's pc one of the three Access 2003 dbs they use daily now fails when running form based code with error 2501" The OpenForm action was canceled" and "the expression on exit you entered as the event property setting produced the following error: Object or class does not support the set of events".

    These are the kinds of errors I've seen with corrupted databases. However the db does not seem to be corrupt. I've replaced it several times and it fails in exactly the same manner. If I move the problematic mdb to another pc it runs fine. There are no broken references. The other mdb's on this pc, which also have code, continue to run normally. I can exectute simple functions like Date() or user defined functions in the immediate window without issue. The db errors with the autoexec code at open; if I skip the autoexec, I can open forms, but most or all code routines via command buttons fail.

    What other options are there? If the office 2003 installation was bad on this pc, the other dbs would also be failing.


    • Edited by rusticloud Thursday, November 12, 2015 7:54 PM
    Thursday, November 12, 2015 7:52 PM

Answers

  • Other logins showed the same issue, so not profile specific.

    The admin did a repair of Office 2003 and that solved it. Can't imagine why whatever it was dinged just one of three similar dbs that tap the same sql server db but anyways...sometimes the "why" never shows up, but that's ok.

    Thanks everyone for trying to help.

    Friday, November 13, 2015 3:35 AM

All replies

  • I would need more details before I can really guess but right off the bat I would ask

    1. Are you using Option Explicit in your code modules
    2. When you test is the setting break on All Errors being used
    3. If there is only 1 problem PC does the user account have permissions
    4. is the document in a trusted location
    5. is it a trusted document
    6. Does the user have a full version of Access installed

    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Thursday, November 12, 2015 8:04 PM
  • These dbs are in use all over the org over years. There is no issue with trust or network auth. Nothing has changed with the user's permissions. Trusted location/docs don't exist in A2003. Yes full access. If I turn on break on all errors it allows me to view the code it's failing on, which is opening the main form or any form if I move the executing line. Option explicit yes.
    Thursday, November 12, 2015 8:09 PM
  • '~~~~~~~~~ Compile ~~~~~~~~~
     
    Whenever you change code, references, or switch versions or operating environment, or modify objects with code behind them, you should always compile and save before executing.
     
    from the menu in a VBE (module) window: Debug, Compile
    (Alt-F11 to switch to the code window)
     
    Fix any errors on the yellow highlighted lines.
    Add needed references and remove missing references if necessary
    (Tools, References...)

    keep compiling until nothing happens (this is good!) -- then Save

    Warm Regards, Crystal http://www.AccessMVP.com/strive4peace * (: have an awesome day :)

    Thursday, November 12, 2015 8:12 PM
  • My question is; what changed before this problem began?  Something changed, either in your application or your OS.  Did you make any code or macro changes.  Did you change any options in Access?

    Have you attempted to debug the problem and walk through the code as it executes up to the offending line?

    Lastly, can you post the procedure where the code fails?

    Thursday, November 12, 2015 8:14 PM
  • I've been building Access since v2 full time so I know about compiling etc <g>.

    There is no 'line' that fails. Any attempt to open a form and execute code invokes these errors. Only on this pc, and only on this db on this pc.

    I am not sure if any of you have been around corrupted dbs but this is exactly how they behave. You can sometimes see like kind behavior if you have broken refs. It's not corrupted - the same mdb runs normally on an other pc. If I replace the mdb with a fresh copy it immediately fails with the same error.

    Thursday, November 12, 2015 8:42 PM
  • "The OpenForm action was canceled"

    this error may happen if the code has

    DoCmd.Openform "Formname"

    and there is a

    CANCEL=true

    statement in the form Open event -- so not really an error, just an oversight on the programmer's part to skip it.

    > "Object or class does not support the set of events"

    put this statement at the TOP of every module ... then compile again

    Option Explicit  ' require variable declaration

    If this was not done when the code was written, you will probably need to DIM some variables -- best to do that anyway

    Warm Regards, Crystal http://www.AccessMVP.com/strive4peace * (: have an awesome day :)

    Thursday, November 12, 2015 9:30 PM
  • I've been building Access since v2 full time so I know about compiling etc <g>.

    There is no 'line' that fails. Any attempt to open a form and execute code invokes these errors. Only on this pc, and only on this db on this pc.

    I am not sure if any of you have been around corrupted dbs but this is exactly how they behave. You can sometimes see like kind behavior if you have broken refs. It's not corrupted - the same mdb runs normally on an other pc. If I replace the mdb with a fresh copy it immediately fails with the same error.


    OK, all that said, have you tried to create a new database and import the objects of your old application into it?
    Thursday, November 12, 2015 9:31 PM
  • No I have not. That would be an appropriate attempt at a fix for 'normal' corruption. I could try it but it is likely to be a waste of time. The db that acts corrupted works on other pcs. The mdbs that work on other pcs fail on this pc. It is not the normal corruption pattern.
    Thursday, November 12, 2015 9:34 PM
  • Crystal those suggestions are well intended but clearly are not going to contribute to a solution.
    Thursday, November 12, 2015 9:36 PM
  • Yes full access.

    Does this 1 PC with the error have more than one version of Access installed?

    Or a differing version of Outlook or Visio to Access?


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Thursday, November 12, 2015 9:50 PM
  • Crystal I know all about compiling. Your suggestions are well intended, but the basics are covered here including option explicit etc.

    But mainly your logic is flawed, and I don't think you need to worry about contributing to this topic. It is impossible that the issues you suggest could impact the one copy on one pc and not on any other pc, and starting with another copy that works perfectly on another pc immediately fails on this one pc.

    Thursday, November 12, 2015 9:59 PM
  • Hi Chris

    All of the pcs at this site only have Office 2003. It's a pretty controlled environment.

    Thursday, November 12, 2015 10:00 PM
  • I did compile it locally.
    Thursday, November 12, 2015 10:26 PM
  • I think i'll have to tap out on this one as I don't have enough info to work with. I'll step out with one last comment to help point the way for you...

    Only 1 machine is acting up?

    If that user logs into another PC with his/her credentials, will it then act up on the other machines?


    Just takes a click to give thanks for a helpful post or answer.
    Please vote “Helpful” or Mark as “Answer” as appropriate.
    Chris Ward
    Microsoft Community Contributor 2012

    Thursday, November 12, 2015 10:55 PM
  • They have the pcs locked down, one user per pc, so I have not been able to test either her profile on another pc or another profile on her pc. However the main IT guy is going to config an alt user for that machine after hours so I can see if the issue is profile based. You're thinking in the same direction I am...but it's still extremely odd. As I said her other dbs work normally. It's almost like there is a corrupted registry entry on her pc that only impacts the one db out of three...and there aren't any special registry entries for any of the dbs.
    Thursday, November 12, 2015 11:10 PM
  • No I have not. That would be an appropriate attempt at a fix for 'normal' corruption. I could try it but it is likely to be a waste of time. The db that acts corrupted works on other pcs. The mdbs that work on other pcs fail on this pc. It is not the normal corruption pattern.

    You stated earlier on that it was just the one application that was failing on the one PC.  You also said that the other Access applications on the same machine were working without fail.  I don't know what you've been doing in the mean time since you originally posted this problem, but instead of accepting anyone's suggestions, I think you've knocked just about everything offered and are still in the same boat.  If it were me, I think I'd try just about anything if there was even a glimmer of hope for getting to the bottom of your problem.  What I'm hearing from you is that everything suggested would just be a waste of time.

    I don't believe that your application is corrupted, but I also don't believe that you've done all that you can to solve the problem.  As Crystal suggested, you should make certain that all of your variables are declared.  You should also try to see if moving the objects to a fresh database will shed a different light on the problem.  Because you say other projects work on this machine, then the problem most certainly exists in the one that is failing.

    I'm also not clear on whether or not this application worked on this machine before, but now does not.  As I stated before, I think that something had to have changed, either on the machine, or in the application to cause this issue.

    How about the OS.  Is it the same on all of the machines and what version are we talking about on the machine that has problems?

    Because you're working with an outdated Access application, what version of Office is installed on the problem machine? 

    "Once you eliminate the impossible, whatever remains, no matter how improbable, must be the truth.”

    Friday, November 13, 2015 12:22 AM
  • In the original post I laid out many of the factors that are known about the situation. It doesn't add up to any of the normal outcomes for this kind of issue. I did respond to the queries from x y and z. Some of the suggestions clearly showed that the writer either hadn't read what I wrote or else felt compelled to review the basics...the basics are covered and this is an outlier case. The app runs widely without the issue displayed by the one machine. If the issue was an untyped variable, which is this app cannot exist, even if it was the problem, it wouldn't suddenly bite on just one machine and copies from other machines wouldn't exhibit the same behavior on this one pc and the copies from the problem pc wouldn't work normally on other machines. First all of that is obvious and second I've repeated it several times here.

    It is a very unusual case. I can't help it if I don't accept suggestions made here to date, because I will only accept a suggestion that works. Am I supposed to accept 'is it a trusted doc in a trusted location' when I stated from day one that this is A2003, which lacks those concepts? Another example is you just asked me what version of Access is installed on the problem machine, and in my original post I said "If the office 2003 installation was bad on this pc, the other dbs would also be failing."

    I do appreciate that folks have responded here. The Access community on this forum is probably the most helpful and most interested group of people I've ever pooled with. I tried to discourage Crystal because it was clear to me that nothing was going to come of that.

    The responses are simply not matching the issue. That's ok I appreciate everyone trying to help. It does not mean I am compelled to follow up every suggestion if I know it is pointless. Chris Ward suggested something logical, essentially one of the routes I am pursuing already. If this issue does end up having something to do with profiles I'll eat my hat - but I know that in this case, it IS possible that it does have to do with profiles, because even though I can't see how a profile issue would ding how one and only one db operates, it still might be possible.

    Friday, November 13, 2015 2:28 AM
  • Other logins showed the same issue, so not profile specific.

    The admin did a repair of Office 2003 and that solved it. Can't imagine why whatever it was dinged just one of three similar dbs that tap the same sql server db but anyways...sometimes the "why" never shows up, but that's ok.

    Thanks everyone for trying to help.

    Friday, November 13, 2015 3:35 AM
  • Another example is you just asked me what version of Access is installed on the problem machine, and in my original post I said "If the office 2003 installation was bad on this pc, the other dbs would also be failing."

    I'm glad to see that you got your problem fixed.  I do want to correct you however, in that I did not ask you what version of Access you had installed.  I asked whether or not your Office installation was different from your Access version in not so many words.  And just because you made a mere mention of Office 2003 in your original post does not mean that you couldn't have been substituting "Office" for "Access" by mistake.  We're just trying to cover every base. 

    Keep in mind that we are operating blind here.  We can't see any more than what you tell us, and many users here don't always have the ability to accurately describe their problem which leaves us throwing darts in the dark trying to hit the target.

    I'll say this again too, something changed on that machine to cause an issue.  Its highly unlikely that it just manifested on its own and out of the blue. 

    Anyway, again, glad you were able to correct the issue.

    Best Regards,

    RM

    Friday, November 13, 2015 7:03 AM
  • It was the Microsoft Windows Updates for later versions of Office (2007 and 2010 - check CONTROL PANEL/PROGRAMS and FEATURES)  on Tuesday 11th that upset mine.

    As you say, REPAIR on Office 2003 usually does the trick. 

    I have a number of versions to support older installations (large UK health organisations for instance still require Access 2003 !) and thus it's not a case of 'just upgrade and shut up'

    Shame it takes 2 foot of posts before Access developers can get taken seriously...



    • Edited by J-BRIM Friday, November 13, 2015 12:14 PM
    Friday, November 13, 2015 12:13 PM
  • Continuing chapters in this episode. It turns out the server that was supplying sql server data for this app was about to fail. It's not clear how this impacted all of the inconsistent and odd manifestations that were taking place, like why only one pc was impacted, but it probably was part of the mix. After the successful Office 2003 repair on the workstation, the next day the failures were appearing sporadically on the original machine and another pc. So the office repair wasn't a full fix. I noticed that the server had some strange behaviors and asked IT to reboot it in the evening. It never came back up. The server is still completely down so there is no way to know if anything with the db is solved or not. It wasn't just a sql server problem - some calls to local temp tables were breaking too. Very odd stuff.

    Saturday, November 14, 2015 8:08 PM
  • Hi rusticloud,

    Have you been enabled to check issue with the db was solved or not?

    I suggest you copy the same Access 2003 db to other pcs to check whether it could work. Since Access 2003 was too old, and it might generate unexpected issue, I suggest you convert to later version to check whether this issue still exists.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Monday, November 16, 2015 2:08 AM