Results 1 to 3 of 3
  1. #1
    mp3909 is offline Competent Performer
    Windows 10 Access 2016
    Join Date
    Feb 2018
    Posts
    154

    Access Database closes when attempting to open up a form

    Hi All,

    I am looking at this Access Database that was working fine up until last Monday and now it has stopped working.
    When I click one of the buttons after few seconds my access database just closes.
    The button I am clicking has the following VBA code behind it:

    Code:
    Private Sub cmdMenu2_Click()
    
    On Error GoTo errorhandler
        DoCmd.OpenForm "frmLimits"      'it gets here and then it goes to the next block of code below
        
    Exit Sub
    
    errorhandler:
        MsgBox Err.Number & " : " & Err.Description
    End Sub

    Code:
    Private Sub Form_Open(Cancel As Integer)
    
    Static MouseHook As Object
         Set MouseHook = NewMouseHook(Me)     'from here it goes to the next block of code which I have attached as a snaphot because the code is too big to paste on here.
    
    End Sub

    In that attached snapshot, where the yellow cursor is is where the application closes.



    Does anyone know what the cause and fix is please?

    Thank You
    Attached Thumbnails Attached Thumbnails break.jpg  

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 10 Access 2016
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,614
    There have been many posts of unexpected faults in many of the Access forums. Most of these faults seem to be the result of an update that ms issued recently.
    Reverting back to before the update or making sure that the files are in a trusted location seems to be the only fixes, I believe.
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    Micron is online now Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,422
    I haven't used that function for a long time and it was to allow mouse wheel scrolling on a datasheet (or was it a continuous) form. Hasn't that been fixed long ago, or do you need it for some other reason?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Error when attempting to open report
    By jbeets in forum Modules
    Replies: 5
    Last Post: 07-24-2020, 07:22 AM
  2. Replies: 3
    Last Post: 06-11-2020, 04:06 PM
  3. Replies: 2
    Last Post: 03-29-2012, 07:45 AM
  4. Change to Form Closes Access
    By jbhjm in forum Forms
    Replies: 5
    Last Post: 04-22-2009, 01:04 PM
  5. Replies: 1
    Last Post: 12-09-2005, 09:16 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