Results 1 to 6 of 6
  1. #1
    Join Date
    Feb 2006
    Posts
    26

    Exclamation Unanswered: Lock Down Application

    Hi There,

    Was wondering if there is a way to lock down the Mde file as I have some
    Update and extraction queries based on transactional data which will get updated by 10 users throughout the day.

    And I would like to throw everybody out at that time when I,m running these procedures.

    Any Ideas guys.!

  2. #2
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    One way of doing this is to create a form that remains hidden from the user. In the forms ontimer event, you could have the mde check a table or other value to see if it's supposed to close or not. If it is, simply exit the application (after proper warning of course).
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  3. #3
    Join Date
    Feb 2006
    Posts
    26
    Could you please a explain in a bit detail as I,m bit blank at this.
    I understand the vb will look like
    If tblcheck!check=1 then close application.
    but how do I make sure that people don't loose the current data or update or currupt data.
    And how do I manage this in MDE enviornment with 5 different Front End using at same time and leave it open for the person who executed the command!.

    Thanks in advance.

  4. #4
    Join Date
    Mar 2003
    Location
    The Bottom of The Barrel
    Posts
    6,102
    Provided Answers: 1
    That's where your specific logic needs to come into play. When I implement this type of method, I have a table (usually named tblControl) that has one row containing application-wide variables I want to track. Examples are version, release date and Active, which is a yes/no field I can use to check and see if a front end should close or not.

    To begin, create a form, set it's visible property to false. Now in an autoexec macro or the tools -> startup -> display form, define your new form to run automatically when the front end opens. Now you have a form that's present but the user doesn't see. Every form has a timer object that you can use to trigger events a specified intervals, use it. In the ontimer event, check your control table to see if a job is pending. If it is, apply your unique business logic.

    It may flow something like this:

    Code:
    Is the Active bit set to false?
       Yes:
          Is the current user an admin?
          Yes:
             Prompt user to see if they are the one initiating a shutdown, if so, let them remain in the database
          No:
             Prompt user to save all changes and exit the database.  
             You could apply additional logic to force shutdown if the user fails to comply
    
       No: Continue normally
    oh yeah... documentation... I have heard of that.

    *** What Do You Want In The MS Access Forum? ***

  5. #5
    Join Date
    Nov 2004
    Location
    Bangor, ME USA
    Posts
    44
    I have this problem myself, unfortunately I cant get it to work right in my environment but maybe you can.

    There is another site that has code and the forms are done for you called rogers access library @ http://www,rogersaccesslibrary.com and it has some good stuff.

    One of the guys on there is Neil Squires (under other developers link) has a function already done called ForceUserOut which basically soes what Teddy told you, It does have some documentation (not a whole lot, but enough [in the VBcode)

    Here it is: http://www.rogersaccesslibrary.com/O...p#Squires,Neil

    also when you add this, you add it to the front end (on your PC) then you'll need to copy it to the other machines(Portable drive are handy for this) but there is another person on that same site that has a Front End copy batch job type setup where when a person opens the front end it vhecks to see if all the forms / reports / etc. have changed. If they have it shuts the database down, copies from a master location (a copy of the FE that no one uses EXCEPT for the designer for designing purposes only) and then restarts the database. This is a little more involved but if you know what your doing it will speed up future updates as you make changes

    HTH
    Kevin M carman

  6. #6
    Join Date
    Feb 2006
    Posts
    26
    Thanks both of you I will try this this week!

Posting Permissions

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