Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Close database (2003)

    I downloaded LogUsersOffNonUse from Rogers Accesslibrary ( <post#=319032>post 319032</post#> to help me with closing down a database on a network. I tried the sample, and it's just what I want. The problem I have is, most of the forms in my database close when another one opens. This means that when a user clicks on a button on the main form, it opens that form but closes the main form. Putting the code on the OnLoad doesn't then notify the user the database is going to close. It just stops working, and doesn't actually close the database. How can I get round this.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Close database (2003)

    This example is intended to display a warning if the user doesn't switch to another control within the set amount of time, then close the database some time later. You'll have to put the code in each form for it to work.

    I myself don't like this method - I wouldn't like it if the database was closed after being on the phone for a few minutes. I prefer Roger Carlson's other example LogUsersOff. There, you can set a value in a table in the backend database. If it's False (the default), everybody can go on working. If it's True, users will get a warning that they need to close their frontend database, and if they don't do that themselves, the code will do it automatically after a set period of time. Also, users won't be able to open the frontend as long as the value is set to True.
    To make this method work, you need to have a form open all the time to run the On Timer code, but this could be a hidden form

  3. #3
    5 Star Lounger
    Join Date
    May 2003
    Location
    Sheffield, Yorkshire
    Posts
    951
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Close database (2003)

    You were right again. Thanks Hans.

Posting Permissions

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