none
Creating new container for FE and BE with Autoexec macro. RRS feed

  • Question

  • I have an MDB FE and BE that I am converting to ACCDB FE and BE.

    I have imported all objects to new FE and BE.

    I relinked new FE to new BE.

    When I open the new FE, the autoexec macro is not displaying the timed form. It just goes to the development environment.

    What might I have missed?

     
    Thursday, November 1, 2018 4:54 PM

Answers

  • I think I solved it. I just had to make sure all of the options in the new database were set to the same values as in the old database. The startup form was just specified as the initial form.
    Thursday, November 1, 2018 7:38 PM

All replies

  • Hi,

    ACCDBs must be "trusted" first. If you see the "Enable Content" button, try clicking it.

    Hope it helps...

    Thursday, November 1, 2018 5:18 PM
  • Sounds like your code runs into an error in your code. Open the IDE and run Debug/Compile.
    Thursday, November 1, 2018 5:21 PM
  • There was a compile error, on

    Dim DB as Database.

    The old database had a reference to DAO library but the new database does not have it and won't let me add it.

    Changed code to Dim DB as DAO.Database

    Compiled without errors, but made no difference

    Autoexec macro still puts me in development environment, does not display startup form.

    Thursday, November 1, 2018 5:52 PM
  • I'm not getting an 'Enable Content' prompt and I am executing from a trusted location.
    Thursday, November 1, 2018 5:59 PM
  • Hi,

    What does "development environment" actually  means? Can you post your Autoexec macro? Thanks.

    Thursday, November 1, 2018 6:06 PM
  • Autoexec macro just runs a function in a module that disables the Close button.

    I cannot figure out what causes the Startup form to open. It's a long while since I coded one of those.

    By 'development environment' I mean I get the list of tables, forms, etc. on the left hand side. I think its called the navigation window. I can suppress that by unchecking 'Display navigation window'. But then I still get all the development icons at the top of the screen like Create, External Data, Database Tools, none of which I get with my old MDB container.


    Function InitApplication()

       Dim c As CloseCommand
       Set c = New CloseCommand
      
       'Disable Close menu.
       c.Enabled = False
    End Function

    Thursday, November 1, 2018 6:43 PM
  • Hi,

    You either have to manually turn off those "development" objects or have code to toggle them. Sounds like your old MDB had them turned off. Since you created a new shell in ACCDB, you'll have to turn them off again. Try doing them manually by going to File > Options > Current Database and uncheck the ones you don't want to see.

    As for the Ribbon, you'll have to add a function in your Autoexec macro to execute the following code:

    DoCmd.ShowToolbar "Ribbon", acToolbarNo

    Hope it helps...

    Thursday, November 1, 2018 6:49 PM
  • I think I solved it. I just had to make sure all of the options in the new database were set to the same values as in the old database. The startup form was just specified as the initial form.
    Thursday, November 1, 2018 7:38 PM
  • Hi,

    Congratulations! Glad to hear you got it sorted out. Good luck with your project.

    Thursday, November 1, 2018 7:54 PM