AutoExec macro, A97?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • MLH

    #1

    AutoExec macro, A97?

    Did A97, perchance, do away with the need for
    an AutoExec macro to initiate an autoexec sequence
    for databases? Or, must we still suffer with that hideous
    macro?
  • Tim Marshall

    #2
    Re: AutoExec macro, A97?

    MLH wrote:
    [color=blue]
    > Did A97, perchance, do away with the need for
    > an AutoExec macro to initiate an autoexec sequence
    > for databases? Or, must we still suffer with that hideous
    > macro?[/color]

    I use an opening form and the on open event of that form. If I just
    want the procedures to do stuff but don't want that particular form up,
    after all the procedures run by the on open event are done, I plop in
    Cancel = True.

    This does pretty much the same as autoexec.

    --
    Tim http://www.ucs.mun.ca/~tmarshal/
    ^o<
    /#) "Burp-beep, burp-beep, burp-beep?" - Quaker Jake
    /^^ "Whatcha doin?" - Ditto "TIM-MAY!!" - Me

    Comment

    • Douglas J. Steele

      #3
      Re: AutoExec macro, A97?

      While I'm not a proponent of macros, I certainly don't see what's so
      "hideous" about the autoexec one!

      In Access 97 (and, in fact, all subsequent versions), you have two startup
      options: you can use an autoexec macro, or you can specify a form to be
      opened at startup. I'll often use an autoexec macro, though, with a single
      command: to run a VBA routine.

      --
      Doug Steele, Microsoft Access MVP

      (no e-mails, please!)



      "MLH" <CRCI@NorthStat e.net> wrote in message
      news:u71jc15esc 8npbbif03mi5q07 8i4k1ugcm@4ax.c om...[color=blue]
      > Did A97, perchance, do away with the need for
      > an AutoExec macro to initiate an autoexec sequence
      > for databases? Or, must we still suffer with that hideous
      > macro?[/color]


      Comment

      • MLH

        #4
        Re: AutoExec macro, A97?

        There ya go! I like it.
        xxxxxxxxxxxxxxx xxxxxxxxxxxx[color=blue]
        >
        >I use an opening form and the on open event of that form. If I just
        >want the procedures to do stuff but don't want that particular form up,
        >after all the procedures run by the on open event are done, I plop in
        >Cancel = True.
        >
        >This does pretty much the same as autoexec.[/color]

        Comment

        • MLH

          #5
          Re: AutoExec macro, A97?

          Ha! I guess I overdid it with the "hideous" parameter. Actually,
          its from back in my original days first working with Access 2.0.
          I didn't know anything about Access Basic and was afraid to
          start with it. So, I did everything in macros for about a year.
          Finally, I bit the bullet. IT TOOK ME YEARS to port over all
          the macros crap I had built. At the risk of being scorned, I really
          do think they're hideous!

          xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxxxxxx
          [color=blue]
          >While I'm not a proponent of macros, I certainly don't see what's so
          >"hideous" about the autoexec one!
          >
          >In Access 97 (and, in fact, all subsequent versions), you have two startup
          >options: you can use an autoexec macro, or you can specify a form to be
          >opened at startup. I'll often use an autoexec macro, though, with a single
          >command: to run a VBA routine.[/color]

          Comment

          • Albert D. Kallal

            #6
            Re: AutoExec macro, A97?

            It is still there, and for compatibility, you would not want to change
            this..as you would then break zillions of databases.

            As others have mentioned, using the startup form is often the solution. (the
            option is in tools->startup).

            In some cases, such as a back end file, when users click on it, I give them
            a message about not having permissions, and then shut down ms-access. (this
            keeps them out of the back end..and no security is needed).

            In this case, since I do NOT need a form, nor do I want to use the preferred
            startup setting in tools->startup, then I do use a macro.

            that macro simples has:

            Msgbox
            Message : You do not have permissions to run this file
            beep: yes
            Type:critical
            Title Cannot run

            And, then the next line of the macro is

            Quit
            options:exit

            So, in the above, I don't have to add a code module, I don't have to add a
            startup form. Yet, I get a nice message telling the user they can't use the
            back end file. So, in this example, a macro is preferred. No forms, no
            modules, and not even a worry about broken refs, or having code to run. The
            only thing I needed to add was the above autoexec macro...

            you can also use the runcode "action" in a macro, and it can call any
            function you have in code....


            --
            Albert D. Kallal (Access MVP)
            Edmonton, Alberta Canada
            pleaseNOOSpamKa llal@msn.com



            Comment

            • SilvrT

              #7
              Re: AutoExec macro, A97?

              KEEWWWLLLLLLL !!!!!!

              Never thought of this before... gonna use it ALWAYS now! LOL

              SilvrT
              Burnaby, BC, Canada

              Comment

              Working...