Results 1 to 5 of 5
  1. #1
    onechriswhite is offline Novice
    Windows Vista Access 2002 (version 10.0)
    Join Date
    Jul 2010
    Posts
    22

    Angry Corrupt VBA

    Hi


    I added some VBA to a form to requery its data on load (I think)

    The form is FRMSelectUnits

    Now, every time I try to view ANY code, Access crashes

    I have attached a copy

    Please help!Assessment DB.zip

  2. #2
    NoellaG's Avatar
    NoellaG is offline VIP
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Jun 2010
    Location
    Belgium
    Posts
    1,175
    Hi, hopefully you have a back-up copy of the database dating befor you added the code to your form. In this case you might try to delete the form from your database and import an incorrupted version of the form.

    success
    Noëlla

  3. #3
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    try this one.
    I was able to open the VBA and there was a compile error so I commented out the routine
    Private Sub Check26_Click()
    Attached Files Attached Files

  4. #4
    onechriswhite is offline Novice
    Windows Vista Access 2002 (version 10.0)
    Join Date
    Jul 2010
    Posts
    22

    Thumbs up

    Quote Originally Posted by JamesDeckert View Post
    try this one.
    I was able to open the VBA and there was a compile error so I commented out the routine
    Private Sub Check26_Click()
    Wow that works great, thank you so much!

    So, how could I have got to view the code to fix it myself and, once there, how do I find a compile error? I'd love to be able to fix it myself but can understand if it's way beyond me! I can write a few bits of code and SQL clauses etc but nothing beyond that atm.

    Also, is it something I did wrong, or just something that Access does from time to time? I thought I had eliminated these kind of corruptions by not using the wizard when adding command buttons, etc.

    Thanks again, it's saved me from madness!

    Chris

  5. #5
    JamesDeckert is offline Competent Performer
    Windows 7 64bit Access 2013
    Join Date
    Jul 2015
    Location
    Salina, KS
    Posts
    262
    I didn't do anything special. I opened the VBA Database Tools>Visual Basic on the ribbon.
    But I have had trouble with opening Access DB's before if there is a compile error.

    to check for compile errors. In VBA editor debug>compile
    I assume the routine I commented out will need fixed, just make sure it compiles ok when you are done fixing it.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Corrupt database? can I fix it?
    By tozey in forum Access
    Replies: 1
    Last Post: 09-13-2012, 09:08 AM
  2. Database Corrupt?
    By MintChipMadness in forum Access
    Replies: 1
    Last Post: 08-08-2012, 09:10 AM
  3. Corrupt DB
    By Wiele in forum Access
    Replies: 5
    Last Post: 06-05-2012, 04:48 AM
  4. Corrupt Form
    By tt08234 in forum Forms
    Replies: 1
    Last Post: 02-12-2011, 01:23 PM
  5. Corrupt Records
    By Nosaj08 in forum Access
    Replies: 7
    Last Post: 08-20-2009, 05:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums