Results 1 to 6 of 6

Thread: VBA code locked

  1. #1
    Join Date
    Mar 2004
    Location
    South Africa
    Posts
    2

    Unanswered: VBA code locked

    Hi,

    Can anyone help. I have a large Access app (32MB) that uses Map Objects 2.2. If I add more lines of code, when I compile the app and then save it, I cannot get back into my vba code. (when I press the code button, the app just hangs) This has happened in 2 different apps. I have reimported all the forms/reports etc into a new app and this does not help either. Is there a limit on the number of lines of vba code that you have in a .mdb file?

    Thanks

    Colleen

  2. #2
    Join Date
    Jan 2004
    Location
    Jersey, UK
    Posts
    108
    Sounds weird, the file isn't that large that it should cause this problem; some of mine run to 500MB.

    I'd try repairing your Office software if that options available, and if not, re-install. ALT+F11 also brings up the code window so I'd be curious if that makes any diff (can't imagine it will!) and I'd also try CTRL+Break to see if that stops the hang and lets you into the code window.

    Good luck!


    Andy

  3. #3
    Join Date
    Mar 2004
    Location
    South Africa
    Posts
    2
    Thanks

    I have tried Alt+ F11 and Ctrl+Break - neither helps. I am working in Access 2000. There is no data in my app as all my data is stored in linked SQL tables. Somehow this is linked to my use of MapObjects. My form that displays the map has 3078 lines of code. I also have a lot of code in my modules. This is the biggest form in the app. This is the second time that this has happened to me, but both apps use Map Objects. I do have apps that are greater than 60MB that have been around for 3 years and have not done this. (they don't use MapObjects). I only get blocked out of the vba code after I have done a successful compile. The application still runs perfectly, so obviously the code must still be there, but is not letting me get at it. I managed to get around this problem last time, but creating a new app and importing all the forms/reports etc from a backup of the corrupted app. After the compile, everything seemed OK, but this time this does not work. Any other suggestions

    Thanks

    Colleen

  4. #4
    Join Date
    Jan 2004
    Location
    Jersey, UK
    Posts
    108
    This isn't really my area of expertise so all I can offer are guesses and places to check.

    From your explanation there are a couple of suspects: Access, the SQL Server DSN, and the code (registry and references)

    I'd still look at repairing Office and MapObjects (if that's possible) as this may well solve the problem; I know it's solved a few problems I've had with db connectivity.

    Maybe cleaning your registry will help? Check your references in the Code window - make sure all is ok there, maybe un-check and re-check them.

    Check your dsn?

    If you type limitations into Access, you'll get a list of its limitations that you can verify against your db.

    Sorry but that's the best I can do.

    Wish you luck.


    Andy

  5. #5
    Join Date
    Nov 2003
    Location
    Sussex, England
    Posts
    404

    Access limits

    Is it possible you've reached the limit of code for the form?

  6. #6
    Join Date
    Jan 2004
    Location
    Jersey, UK
    Posts
    108
    If there is a code limit, you should be able to verify that by removing chunks of code and seeing if your new code (which you haven't removed) works with a compile.

Posting Permissions

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