Share via

MS Access - Compiled after 1st for does not load anything

Phillip J. Seaman 0 Reputation points
2026-02-20T21:47:09.59+00:00

I have an application that I have worked on for some time and I am at the stage of distribution and I have a strange issue...
Compile - Success
frmLogin - success

frmMainMenu - Fails to load
the mani menu for loads correctly when I run the code but it will not load in the compiler mode.

' 7. Load frmMainMenu

DoCmd.OpenForm "frmMainMenu"

logMsg = "frmMainMenu opened"

TraceLog logMsg, "INFO"

What am I missing?

Microsoft 365 and Office | Access | For business | Other

2 answers

Sort by: Most helpful
  1. Gabriel-N 15,600 Reputation points Microsoft External Staff Moderator
    2026-02-21T07:23:05.1333333+00:00

    Update (23 Feb): The user has confirmed that the issue has been self‑resolved in a private message.


    Hello Phillip J. Seaman, thank you for reaching out to the Q&A forum and I apologize for the delayed response.

    First, I recommend reviewing the AI-generated response on your post as it offers some helpful insights that align closely with my own thoughts on the issue.

    Additionally, I’d like to point out that recent updates to Microsoft Access have introduced tighter security around SQL queries that reference external databases. This change may be contributing to the behavior you’re seeing. I recommend reviewing the following article to determine whether it applies to your scenario: Query Reference to Remote Database Fails.

    Note: This information is provided as a convenience to you. These sites are not controlled by Microsoft, and Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. Please ensure that you fully understand the risks before using any suggestions from the above link.

    You may also want to try importing all objects into a new, blank ACCDB file (External Data > New Data Source > From Database > Access), then recompiling the database and creating a new ACCDE file.

    I hope this information is helpful. If the issue persists, please feel free to send your file to me via private message so I can help investigate it further.

    User's image


    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.  

    0 comments No comments

  2. Q&A Assist
    2026-02-20T21:47:17.0866667+00:00
    AI generated content. This question contains an answer created with AI from Q&A Assist. Learn more

    It seems like you are encountering an issue where the form frmMainMenu fails to load in the compiled version of your application, even though it works correctly when running the code. This could be due to several reasons:

    1. Corrupted Form: The form might be corrupted. You can try to recreate the form or import it into a new database to see if that resolves the issue.
    2. Missing References: If there are missing or broken references in your project, it can lead to issues when loading forms. Check for any missing object libraries or type libraries by going to the Visual Basic Editor, clicking on Tools, and then References. Look for any items marked as MISSING and resolve those references.
    3. Errors During Load: There might be unexpected errors in the form's code or design that prevent it from loading. You can check the log files created by Visual Basic for more details about any errors that occurred during the load process. Sometimes, minor issues like a missing version number can be ignored, but others might be critical.
    4. Form Name Conflicts: Ensure that there are no naming conflicts with other forms or controls in your application. If the form name is already in use, it could prevent it from loading properly.

    If none of these solutions work, consider checking the specific error messages you receive during the load process for more clues on what might be wrong.


    References:

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.