Results 1 to 11 of 11
  1. #1
    New Lounger
    Join Date
    Apr 2003
    Location
    Burnley, Lancashire, England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Module not found (2000)

    I have made many minor changes to my database (all the niggly bits) and now whenever i try to open any form, or anything that has VBA Coding behind it i receive the following error message.

    "The expression On Click you entered as the event property setting produced the following error: Can't execute code in the design mode."

    Even on forms that i have not done any work on for weeks have the same problem.

    I seems that it cannot find any module, as if i do not receive the error message above i get "Module not found" e.g. when trying to open or close a form or use a button.

    I can open any form in design view with no error message

    * Another problem is that when i try to make a copy of the database (in windows explorer,copy, paste) file so that i can try fixing the copy through various attemps
    i get the error message
    "Cannot copy "DatabaseName" : Access is Denied. The source file may be in use.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Module not found (2000)

    1. Make sure that nobody is using the database. Look at the folder that contains the database. If you see a file with the same name as the database but with extension .ldb, delete it.

    2. Open the database, then activate the Visual Basic Editor (Alt+F11). Select Debug | Compile <project>. If you encounter "ordinary" code problems, resolve these before continuing. Then switch back to Access, and select Tools | Database Utilities | Compact and Repair. If you're lucky, things will work now.

    3. If you got error messages in step two, you can try some other things:

    3a. Decompile the database, then compile and compact as described in step 2. If you don't know what decompiling a database is, do a search for it in this forum. For example: <post#=44865>post 44865</post#> and other posts in that thread.

    3b. Use the JetComp utility to compact the database. Since JetComp doesn't have to open the database, it is able to repair some problems that the built-in Cpmapct and Repair can't handle. You can download JetComp from <!mskb=273956>Microsoft Knowledge Base Article 273956<!/mskb>.

    4. If step 3 also fails, your database seems to be seriously corrupted. Create a new empty database, and try importing as many database objects as possible from the corrupt database.

  3. #3
    New Lounger
    Join Date
    Apr 2003
    Location
    Burnley, Lancashire, England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Module not found (2000)

    i have created a new blank database, but when trying to import from other database receive error message, have imported in stages and found that when i try to import the employees form I receive the error message

    "The Microsoft Jet Database could not find the object 'employees'. Make sure the object exists and that you spell its name and path name correctly."

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Module not found (2000)

    This indicates that the Employees form has become corrupt.

    There is a bizarre trick that has helped me recover corrupt form modules several times in Access 97; I have no idea if it works in Access 2000 in general and in your database in particular, but it won't take much time.

    In the problem database, open the Employees form in design view.
    Switch to the Visual Basic Editor (Alt+F11).
    Activate the Immediate window (Ctrl+G).
    Type ? Forms("Employees").Module.CountOfLines then press Enter.

    If you don't get an error message, you may be able to get into the form module now.
    Otherwise, I fear that the form is lost beyond recovery. If you have a recent backup that contains a non-corrupt version of the form, you can copy that into your new database. Of course, you will have to create anew all modifications you made after the backup.

  5. #5
    New Lounger
    Join Date
    Apr 2003
    Location
    Burnley, Lancashire, England
    Posts
    16
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Module not found (2000)

    cannot view the form in design mode and cannot view the code for the form - think it's back to the old version (great, love going through what i have done a couple of days ago)

    Thanks anyways people, have learnt and tried various things that i had no knowledge of before.

  6. #6
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    Virginia, USA
    Posts
    1,560
    Thanks
    37
    Thanked 1 Time in 1 Post

    Re: Module not found (2000)

    One more note on all this: Make a back-up copy of the working DB once you have it working! Harken to the voice of experience: Back-up every day! Maybe more often, if you have a "work in progress."

  7. #7
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Module not found (2000)

    Well said Lucas.
    Every hour on the hour is probably more like it. It certainly saves the pain of trying to remember what you did since the last backup.

    Pat

  8. #8
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Module not found (2000)

    I also use a product called TextPad, a shareware app that I much prefer to either NotePad or WordPad, and make extensive notes as I go about exactly what I did to each form, report, module, etc. I create a new document for each day and save them all in a workspace so I can open them again easily if I need to. That makes it much less painful when you manage to toast your database because you can at least figure out what should be there and isn't. <img src=/S/shrug.gif border=0 alt=shrug width=39 height=15> One feature I especially like is the ability to search for a word or phrase in all the files in the folder. Makes it easier to see what I did on a particular object over a period of time.
    Charlotte

  9. #9
    Platinum Lounger
    Join Date
    Dec 2001
    Location
    Melbourne, Australia
    Posts
    4,594
    Thanks
    0
    Thanked 27 Times in 27 Posts

    Re: Module not found (2000)

    Nice idea Charlotte, like an audit trail of what you have done.

    Re the backup, it normally only takes about a minute to backup a database, and to then rename the database to DBname yymmdd hhmm.mdb

    Pat

  10. #10
    4 Star Lounger SteveH's Avatar
    Join Date
    Jan 2001
    Location
    Chelsea, Gtr London, United Kingdom
    Posts
    587
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Module not found (2000)

    Personally I use Excel to make a list.
    I list Date; Time; Version No; Object Name; What Done; Completed etc.
    Then using AutoFilter you can easily see a complete history for an object/version/day or whatever.

    Just my <img src=/S/2cents.gif border=0 alt=2cents width=15 height=15>
    Steve H
    IT Lecturer/Access Developer
    O2K SR3/O2010; Win7Pro

  11. #11
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Module not found (2000)

    That would work too, bu t I prefer the small footprint and complete flexibility of a text processor. The files are just txt files, so they can be read by any text processor, they aren't very big, and I can structure them or not any way I please. Mine include notes on things to be done or problems, not just what I did.
    Charlotte

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •