Results 1 to 8 of 8
  1. #1
    Voyage34 is offline Novice
    Windows 10 Access 2007
    Join Date
    Sep 2019
    Posts
    5

    Form works once VB has been opened and closed.

    Hi



    I have a simple form which has worked consistently. It has now stopped working unless I go into 'Design' and select any button. Open the 'On Click' Event Procedure. I don't change anything at all. I then close VB and change to Form View and it works.

    The form continues to work until Access is shut down and restarted. I then need to repeat the process.

    Any ideas what is causing this? Access 365.

    Thanks

  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,538
    Does the code compile without errors?
    Have you ran a Compact and Repair?
    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
    Voyage34 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2019
    Posts
    5
    The form loads with errors and returns errors when pressing any of the buttons.

    I haven't run a Compact and Repair though.

  4. #4
    Voyage34 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2019
    Posts
    5
    Compact and Repair hasn't changed anything.

    Interestingly I created a backup of the database first and the form works fine on the backup, just not on the original. Might need to change to the backup in that case but can't see why it happened.

  5. #5
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,902
    Sometimes weirdness is corruption that can't be fixed. Have to rebuild or some other work around, like your backup. Try renaming bad version so can then rename backup and use.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    Compact and Repair hasn't changed anything.
    That doesn't address whether or not the code compiles. Try that (or report on it if you have?).
    Since you have a working backup, I might also try a decompile and then compile on the problem db and see what happens.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Voyage34 is offline Novice
    Windows 10 Office 365
    Join Date
    Sep 2019
    Posts
    5
    Thanks for your help everyone. The backup seems to be working fine so will switch to using that.

    I am a novice and have been running a very basic database to help with my work. The 'code compile' statement and how to check it is alien to me. Sorry.

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,791
    The 'code compile' statement and how to check it is alien to me
    You're at work but can't use a search engine like Google and look up what you don't know?
    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. Replies: 5
    Last Post: 03-27-2017, 07:48 PM
  2. Check that My Form is not Closed
    By Ossos in forum Access
    Replies: 8
    Last Post: 10-05-2016, 07:00 AM
  3. Replies: 1
    Last Post: 09-27-2013, 04:07 PM
  4. Replies: 4
    Last Post: 03-05-2012, 03:25 PM
  5. Replies: 4
    Last Post: 08-17-2011, 05:30 AM

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