Error message: Access has stopped working

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • borlowski
    New Member
    • Dec 2014
    • 19

    Error message: Access has stopped working

    Hi. SQL BE and Access FE. Built two stored procedures for users to get prompted for what they want to view. Then built two buttons, one for each of the procedures, that the users would click on. Tried it and all was fine. Next time I opened Access, I got a message after a few seconds saying Access has stopped working. A problem caused the program to stop working correctly. I have other on click events for buttons so not sure what could be going on. Any one have an idea? Thanks.
  • twinnyfo
    Recognized Expert Moderator Specialist
    • Nov 2011
    • 3662

    #2
    have you tried stepping through the procedures to find out at which point the application stops working?

    Comment

    • borlowski
      New Member
      • Dec 2014
      • 19

      #3
      It is a very short procedure. Prompts for a company name. That is it.

      The hosting company did say that there was an Access crash in a VB module.

      Comment

      • twinnyfo
        Recognized Expert Moderator Specialist
        • Nov 2011
        • 3662

        #4
        And no other procedures are being called at that time?

        Have you had any issues when compiling or just at run-time?

        I know I have had strange occurrences such as yours for no apparent reason. In the past, I have tried creating a new Access FE and importing all the tables, table links and other objects into the new DB, then compile it and it works fine.

        Comment

        • borlowski
          New Member
          • Dec 2014
          • 19

          #5
          No other procedures. No issues till last week after I built the two buttons. Then I got a restored copy of a backup that was done before the two new buttons. Rebuilt the buttons. Same error message. The message shows up so quick and closes Access that I can not get into the module to look at the VB.

          Comment

          • Rabbit
            Recognized Expert MVP
            • Jan 2007
            • 12517

            #6
            Can you post the code?

            Comment

            • borlowski
              New Member
              • Dec 2014
              • 19

              #7
              I can't get to the code....Access shuts down too quickly. It would just be a simple on click event to run the stored procedure.

              Comment

              • Rabbit
                Recognized Expert MVP
                • Jan 2007
                • 12517

                #8
                You said it crashes if you try to recreate it correct? Please recreate it and post that code. Also, post the code for the stored procedure.

                Comment

                • borlowski
                  New Member
                  • Dec 2014
                  • 19

                  #9
                  Code:
                  SELECT      OPNumber, ReportMonth, ReportYear, [Begin Recognition Date], [End Recognition Date], [Program Name], [Program Level], [Recognition Type], 
                                          [Data Aggregator], NPIUPIN
                  FROM          dbo.RDEReports
                  WHERE      (NPIUPIN = @NPI)

                  Comment

                  • borlowski
                    New Member
                    • Dec 2014
                    • 19

                    #10
                    Code:
                    Private Sub Command7_Click()
                    On Error GoTo Err_Command7_Click
                    
                        Dim stDocName As String
                    
                        stDocName = "spOPRDEPrompt"
                        DoCmd.OpenStoredProcedure stDocName, acViewNormal, acReadOnly
                      
                    Exit_Command7_Click:
                        Exit Sub

                    Comment

                    • twinnyfo
                      Recognized Expert Moderator Specialist
                      • Nov 2011
                      • 3662

                      #11
                      And just by placing this code into your project it crashes when you open it?

                      I can't see that a SELECT Statement would cause a crash....

                      Rabbit, others, your thoughts?

                      Comment

                      • borlowski
                        New Member
                        • Dec 2014
                        • 19

                        #12
                        I don't even have to open the statement to have Access crash. For example, I wanted to open a form in design view and crash. I walked a user through the process of finding the restored DB and she got the error message as well so it is not user related.

                        Comment

                        • Rabbit
                          Recognized Expert MVP
                          • Jan 2007
                          • 12517

                          #13
                          How big is the file?

                          Comment

                          • borlowski
                            New Member
                            • Dec 2014
                            • 19

                            #14
                            Good morning. 3.46 MB. Sorry for the delay but I leave work around 3:15.

                            Comment

                            • jforbes
                              Recognized Expert Top Contributor
                              • Aug 2014
                              • 1107

                              #15
                              Sometimes you can get into a quirky database by opening Access, then opening the database while holding down the Shift key. This will attempt to bypass any startup code.

                              If you can get into your database this way, I would switch over to code view (Alt-F11) and recompile the code from the Debug menu, save your changes and attempt to re-open the database. Sometimes this works.


                              Alternatively, You might want to create a blank Access Database and attempt to import all the objects out of the possibly corrupt database into the new/blank database. You would then need to re-link the SQL tables, views and re-create your pass-through queries.

                              Comment

                              Working...