Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Execute code on startup (Access 2K, Win 2KPro, SQL Server 2K)

    Is there a way to set a procedure to run on startup? I have some code that finds the windows login id and want to use that to create an audit trail for logins as well as control access to various form elements based on the logged in user. I know you can setup access to load a form on start-up and that's where I currently have the user id code running (form OnLoad) but it would be better to abstract the code to grab a login ID outside of any particular form. In general, some way to load a var globally on startup would, i think, make a cleaner design and easier one to maintain.

    FWIW I'm trying NOT to setup Access security as I am trying to avoid yet another userID/pwd schema. Access to the db will be controlled on the share drive folder permissions so I am more interested in controlling form control display/availability and implementing some audit trails. I know there's some overlap here but I'm trying to make the application's behaviour transparent to a given user, if ya know what I mean.

  2. #2
    Star Lounger
    Join Date
    Nov 2005
    Location
    Edmonton, Alberta, Canada
    Posts
    66
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Execute code on startup (Access 2K, Win 2KPro, SQL Server 2K)

    Create a macro called autoexec. Use that macro to call a startup function.

  3. #3
    5 Star Lounger
    Join Date
    Jan 2001
    Location
    austin, Texas, USA
    Posts
    1,029
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Execute code on startup (Access 2K, Win 2KPro, SQL Server 2K)

    thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •