Results 1 to 12 of 12
  1. #1
    kkohnnnnn is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2023
    Posts
    3

    Access immediately closing when trying to open file

    To start off, I will say I'm fairly knowledgeable with PC's, but not at all with Access. The company I work for uses Access to run an HVAC database. We have 3 computers we use. The file in question will open just fine on 2 of the computers but not on the 3rd computer where I need it to. I have tried opening the file several ways (as admin, through it's file location, opening it through Access) but it always just immediately closes Access. The prompt will pop up and show the file path and let me hit ok/open but then Access just closes. The file is available on the work server and just in case there was something wrong there, I emailed and took a copy of the file from the computer it works on and put it on the computer in question but it still won't open. I have tried repairing/reinstalling Access/Office and that doesn't help. All 3 computers are using the same version of windows/office so I am not sure what the issue is. All three computers have the full version of access.

    I know this isn't super detailed but any help is appreciated. I can give more detail as needed. I am stumped on why the file won't open on the 3rd computer when it is the exact same file on the same version of windows/office on all computers.



    Edit: I've tried using Access via Office 365, Access 2016, and Access 2010 just in case but none were able to open the file.

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    I would start with the Event Viewer.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    We had this....usu the pc gets an office update (or windows) and Access will not open any databases.
    search for this msoft bug. I cant remember the fix.

  4. #4
    kkohnnnnn is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2023
    Posts
    3
    Looked in Event Viewer and didn't see any error under the Application, Security, Setup or System tabs relating to MSACCESS.

  5. #5
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    As per Ranman's post compare version numbers of Access on all PCs? Did you actually remove and install Office again?
    Compare windows updates as well.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    Can you open the db with shift key bypass?
    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.

  7. #7
    twgonder is offline Expert
    Windows 10 Access 2021
    Join Date
    Jun 2022
    Location
    Colombia
    Posts
    658

    A bit more

    Quote Originally Posted by June7 View Post
    Can you open the db with shift key bypass?
    First, good job on describing your problem. It would help to know what kind of Access file you're trying to open, there are many. Tell us what the file extension is. I'll assume for now it's an .accdb file. Some of the other types of files have their own behaviors. I'll also assume you don't have more than one version of Office or runtime for Access on the problem PC and that if you did multiple installs, you've removed them, down to the one common version and rebooted.

    This in post #1 could be confusing, "The prompt will pop up and show the file path". Please elaborate which prompt you're seeing.
    Also, there is a thing called a split database. We need to know if that's what you have. You can check for lots of "linked" files in the two dbs that are working, meaning it's split.

    Did the .accd(x) file ever run before, without a problem, on computer #3?

    I have your problem a lot. Even though I'm developing on the same machine, a .accdb may just stop opening after a save, backup save, compact, or code change.
    And sometimes, I'll click on Access (not an Access.accdb) and Access just won't open. This has been going on for a year now while I've been developing with Office 2021.

    If Access won't start (I know you said it starts, I'm just curious if it starts every time), then I reboot the PC and most of the time that works. If your using Windows fast start, you may want to disable that as I've found that will help too if there is some kind of "temporary" Access corruption.

    If it's not the above, I'll elaborate on June7's comment, post #6.

    If Access itself will start reliably, but the .accd(x) file just won't stay open then I do two things:

    1) Go to File (in the Access app), and use Open (not the recent list) and browse to your .accd(x) file. Select the file (not double click it) and while holding down the shift key (not letting up) press the Open button. If Access and your file remain open, then there is probably some kind of security control in the Access Application file (.accd(x)) that is getting triggered. The shift part stops any autoexec type procedure (macro/VBA) from running when starting. If you have a VBA type start (I don't use the macro type, so I'm not competent to suggest on that) and have a full .accdb file, then you can start debugging with the auto startup code. If it's a commercial package using a .accde or other file type (I don't know them all) then you'll have to try and find the .accdb or contact the developer of the software. There may be some kind of local configuration or licensing issue. If you just copied one of my .accd(x) files to a new machine, I would give you an error message before slamming shut, but another developer may not do that nicety.

    2) If in the prior step, using the shift key fails, meaning Access itself shuts down, then most likely you have some kind of Office/Access corruption that is preventing the .accd(x) file from fully opening. Then I would go through all the steps from rebooting (as mentioned earlier) back up to a reinstall of Office.

    You might also want to check the bitness (32/64) of the different versions of Access you have running.

    Good luck.
    Last edited by twgonder; 10-12-2023 at 09:23 AM. Reason: clarify

  8. #8
    kkohnnnnn is offline Novice
    Windows 10 Office 365
    Join Date
    Oct 2023
    Posts
    3
    First off, thanks for the detailed explanation.

    Regarding the prompt, the message I get usually says something along the lines of "A potential security concern has been identified. It is not possible to determine that this content came from a trusted source." Below that, it shows the path of the file trying to be opened, example - C:User/Downloads?officeside.accdb Below that I Get the option of Open or Cancel, I hit Open and after that point, Access and the file close. Right before they close, I can see the word Access that is in the top middle of the screen (similar to having any program open and the top task bar showing the program name (ie: Excel, Word) changes from Access to Fireline System, which is the name of the actual Access "Program" or database we use. I've attached a picture, where the word Access is, in the top middle is where I'm referring to seeing it change to Fireline System from Access right before it shuts itself down.

    I've tried rebooting after Access not starting/opening. I can open Access and choose files, but when I choose the file I need it instantly closes again. Not using Windows quick start. The file is an .accdb file

    Regarding the holding shift method, I did that and Access will remain open now, and show on the left hand side Table, Queries, Forms, Reports, Modules. Usually, when opening this file and it worked correctly, it would open into a program/script (This is the part that is hard to explain for me so please bear with me.) I open the .accdb file through Access which then in turn opens into Fireline System, which I believe is basically just a custom database that was created for us to keep track of all of our customers and their information. I don't want to call the HVACPACK it's own program because it is really just the access file, but when I hold down shift and open the file, Access stays open and I can see the Access menus but not the Fireline System "program" that it is supposed to open.

    This is with Access 2016 by the way. I tried using Access 2010, Access 2016 & Access via Microsoft 365, but ended up uninstalling office completely and all versions of Access and reinstalled the 2016 version, which is what as originally used to create the file and had been used.

    Any further help is appreciated. Making some progress now that Access stays open with the hold shift bypass and I can see that there are tables, queries, forms, etc made. I see that holding Shift stops the autoexec of the macro/VBA which I am assuming is the "program" I refer to above. If it's helpful I can even upload/send a copy of the file.

    Click image for larger version. 

Name:	Screenshot (5).png 
Views:	22 
Size:	75.1 KB 
ID:	50899

  9. #9
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,940
    Move the file from there to a trusted location in Access.
    Sounds like Access is just trying to protect you.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  10. #10
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    Over a year ago, MS added the 'mark of the web' AKA MOTW to all files downloaded from the internet or email as an extra security measure.
    Before these can be used, you first need to unblock the file.
    See my article Unblock downloaded files (isladogs.co.uk).

    Whilst the new feature is in many ways a pain in the posterior, it does provide a useful safeguarding role as protection against viruses or other malicious code.
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,801
    My first recommendation would be to make the location of this file a Trusted Location because it seems that it is not. That suggests you copied this db from somewhere and installed it in a non trusted location. You got to where you are now because you've bypassed startup code and code may not run in non trusted locations. If any of that is true wtr having copied the file, then there might be code that detects you have opened a copy and it's causing Access to close. We could only detect that by examining the db should you care to post a compacted and zipped copy of your db here. You'd have to include both front and back ends if the db is split.

    Sometimes right clicking on the file in Windows Explorer and selecting Properties and choosing "Unblock" is necessary for files that were downloaded from somewhere.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  12. #12
    journeyman is offline Advanced Beginner
    Windows 11 Access 2016
    Join Date
    Dec 2022
    Posts
    82
    Just tossing in a quick suggestion.

    Consider converting the ACCDB to an ACCDE (Access Executable) file.

    An ACCDE works the same as an ACCDB file except that if can only be made if there are no runtime errors, which you'd have to check for. An ACCDE file will also prevent any attempt to edit your development environment - Be careful not to delete your original ACCDB development file, or you'll be screwed if you want to make updates.

    It should compile and fix the DB during the executable creation.

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

Similar Threads

  1. Replies: 13
    Last Post: 04-17-2022, 09:54 AM
  2. Replies: 6
    Last Post: 09-14-2017, 07:31 AM
  3. Replies: 7
    Last Post: 08-07-2014, 06:07 PM
  4. Replies: 2
    Last Post: 06-25-2014, 10:29 PM
  5. Replies: 1
    Last Post: 09-27-2010, 10:10 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