Results 1 to 7 of 7
  1. #1
    vector39 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    May 2017
    Posts
    76

    Microsoft Access has stopped working

    Hi everyone



    So I keep running into an issue I'm sure Access is notorious for and that I keep getting these Microsoft Access has stopped working error messages. It seems random at times but I suspect it has something to do with the VBA code associated with a classic user login form I've created which automatically pops up and prompts the user to enter their credentials once the database is open. I commented the login form VBA out and for a while these errors did not appear. However today, after coming back from break, I opened the database and was met with this same error. I keep backup copies everyday as well as a compact & repair at the end of each week. So my question is, am I stuck dealing with these errors until I have a final product? I'm doing an internship for a company but how can I ensure these errors will not continue afterwards? I obviously don't want this coming up for any future users. I went online and the suggests I found were that a decompile would help eliminate any corruption, but should this be done at the end once I have a final product? Also I'm the only one with access to this project which is why I did not split the database into "live" and "dev" version.

    Thank you.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    A De-compile might help and there is no reason to wait. You could also simply *import* your file into a NEW EMPTY db which tends to leave any corruption behind. Please fix the issue before putting more energy into this project.

  3. #3
    vector39 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    May 2017
    Posts
    76
    Quote Originally Posted by RuralGuy View Post
    A De-compile might help and there is no reason to wait. You could also simply *import* your file into a NEW EMPTY db which tends to leave any corruption behind. Please fix the issue before putting more energy into this project.
    The reason I ask is because I intend to do more to this project such as setting user permission, add new user, switch user, etc. I suspect this will involve a lot more VBA. I'm not too familiar with VBA and worry it will cause some sort of corruption down the road. So my thinking is that, if I do this decompile/import technique, that will make the final product free of bugs(hopefully) and won't cause random crashes for future users. I'm still a noob and always open to more info or suggestions. Thank you!

  4. #4
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,399
    into an issue I'm sure Access is notorious for and that I keep getting these Microsoft Access has stopped working error messages
    it is usually down to poorly written code - variables not declared, no error management, incorrect treatment of nulls being common reasons

  5. #5
    vector39 is offline Advanced Beginner
    Windows 8 Access 2010 32bit
    Join Date
    May 2017
    Posts
    76
    Quote Originally Posted by Ajax View Post
    it is usually down to poorly written code - variables not declared, no error management, incorrect treatment of nulls being common reasons
    Do you recommend any online resources for writing proper vba/error management? I'm still new to access and borrowed some code online and just modified it to this specific task, so that's probably why i'm getting these errors.

  6. #6
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by vector39 View Post
    Do you recommend any online resources for writing proper vba/error management? I'm still new to access and borrowed some code online and just modified it to this specific task, so that's probably why i'm getting these errors.
    Crystal has some excellent tutorials here: http://www.accessmvp.com/strive4peace/

  7. #7
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,399
    Do recommend you have Option Explicit at the top of each module (just below Option Compare Database) which will trap undeclared variables. You can set this for the default for all new modules by going to tools in the vba editor, select options, then on the Editor tab, tick Require Variable Declaration.

    Other tips include do not have spaces or non alphanumeric characters in field and table names (use the caption property if required), do not start names with numbers, do not use reserved words - see this link. https://support.office.com/en-us/art...7-da237c63eabe. Also be consistent with naming conventions and give controls etc meaningful names (e.g. cboSelectEmployee rather than combo1).

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

Similar Threads

  1. Replies: 8
    Last Post: 05-23-2016, 01:20 PM
  2. Access has stopped working
    By mrkaye in forum Access
    Replies: 0
    Last Post: 05-22-2012, 04:09 PM
  3. Microsoft access has stopped working
    By jhargram in forum Access
    Replies: 5
    Last Post: 03-28-2012, 04:46 AM
  4. Access has stopped working
    By phillb in forum Forms
    Replies: 9
    Last Post: 01-10-2012, 12:22 PM
  5. Replies: 9
    Last Post: 11-22-2011, 05:23 PM

Tags for this Thread

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