Results 1 to 10 of 10
  1. #1
    jeffhanner is offline Advanced Beginner
    Windows 10 Access 2019
    Join Date
    Sep 2022
    Location
    Lincolln, CA
    Posts
    40

    Can't Save as ACCDE file

    I'm trying to create an ACCDE file, however I get an error message that it can't create .accde, .mde or .ade file.'
    I read where you can't have any references in VBA for .mdb or accdb. I removed one reference to .mdb and there are no other. I also compacted/repaired the database afterwards.

    There must be something else I'm missing about the front end code or a setting perhaps. The backend is sitting on my companies onedrive.

    Any suggestions

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    You can't create an ACCDE if there are any errors in your code.
    For example 64-bit API declarations that compile but aren't correct.

    The issue with having any references to ACCDB or MDB files is that the file then effectively takes on the code and references for that as part of the library.
    As the external file isn't compiled, it stops you compiling your own file.

    See Unable to save a database as an accde or mde file - Office | Microsoft Docs

    If the external file is an ACCDE, it won't stop you compiling your own file as ACCDE.
    Alternatively make your external file as ACCDB add-in. You will now be able to create an ACCDE

    On a different subject, you should NEVER run a database where the BE is on a cloud storage site such as OneDrive.
    Doing so significantly increases the chances of corruption if there are even brief interruptions to your connection when writing data to the BE
    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

  3. #3
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    Do you have option explicit at the top of every module? If you haven’t the code may appear to compile, but perhaps not to a state suitable for creating a .accde

  4. #4
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    And another thing....
    Check you have no empty procedures i.e. nothing between the header line and End Sub/Function as that will also prevent an ACCDE being created.
    Recent versions of Access should delete these procedures when you compact but that may not happen if your database crashes or gets forcibly closed at some point.
    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

  5. #5
    jeffhanner is offline Advanced Beginner
    Windows 10 Access 2019
    Join Date
    Sep 2022
    Location
    Lincolln, CA
    Posts
    40
    Thank you for that suggestion. I have added it to every module, but it didn't make a difference.

  6. #6
    jeffhanner is offline Advanced Beginner
    Windows 10 Access 2019
    Join Date
    Sep 2022
    Location
    Lincolln, CA
    Posts
    40
    Thank you for all of your suggestions, I will work on those. Right now, there is only one other user who is only using Power Bi to retrieve data from the back end. I will make periodic back ups if the file somehow becomes corrupted.

  7. #7
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    It really doesn't matter whether you have one user or many. Running a database using cloud storage WILL lead to corruption at some point ... possibly frequently.
    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

  8. #8
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,430
    One other thought - presume you have appropriate rights to the folder where you are trying to create the .accde?

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Office 365
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,977
    This thread has prompted me to complete a web article I'd already started on this topic: https://www.isladogs.co.uk/accde-create-fail/index.html
    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

  10. #10
    jeffhanner is offline Advanced Beginner
    Windows 10 Access 2019
    Join Date
    Sep 2022
    Location
    Lincolln, CA
    Posts
    40
    Thank you for the article you wrote. I discovered that, because I was creating a lot of example code that wasn't used in my program, I found a lot of undefined variables and methods. I was able to go through all of them and eventually able to make the accde file.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-06-2021, 02:12 PM
  2. Replies: 8
    Last Post: 12-17-2020, 08:55 PM
  3. ACCDE file read only????
    By Jen0dorf in forum Access
    Replies: 10
    Last Post: 11-29-2015, 03:16 PM
  4. .ACCDE File Format
    By kpo in forum Access
    Replies: 3
    Last Post: 10-23-2012, 11:00 AM
  5. Cannot create ACCDE file
    By swilliams in forum Access
    Replies: 1
    Last Post: 06-03-2010, 03:41 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