Results 1 to 14 of 14
  1. #1
    Join Date
    Aug 2006
    Posts
    12

    Unanswered: Closing all database connections

    I have an access database I want to share, but in order to do maintenace I want to be able to close all connections. The reason I want to do this is because some of my users are located in different states.
    Mike

  2. #2
    Join Date
    Feb 2004
    Posts
    90
    The way I do it is to have a linked table that holds the value zero. Let's call it MaitenanceValue

    Then I have a form that opens when the database is opened, and runs in the background whilst the database is open. This form periodically checks (using the form timer property) the MaitenanceValue. If it is Zero it does nothing.

    But if I have changed the MaitenanceValue to one it quits the database.

  3. #3
    Join Date
    Aug 2006
    Posts
    12
    Goldy,

    Thank you, but could you please go a little more indept and explain how to do this process.
    1. What do I link this tabel to?
    2. using the form timer property.

  4. #4
    Join Date
    Feb 2004
    Posts
    90
    Gladly...

    But first, could you explain the database set up you have.

    You say you have multiple users at multiple sites accessing the same database...

    Have you split the database up, so that the users use a "front-end" and all the data is stored in a "back-end"?

    If not, how is your database set up?

  5. #5
    Join Date
    Aug 2006
    Posts
    12
    I am using access 2003 with multiple tables sharing a common key. I will be splitting the database prior to sharing to other users, but I can splitt it now if it's easier. I also have a login form that directs users to a particular form depending on the login. But from this form users are able to access a number of other forms. This will be read only for all external users about 34 users in all, not all will be accessing at the same time.

  6. #6
    Join Date
    Feb 2004
    Posts
    90
    I've created a little mock-up. You can download it here.

    The "BackEnd" part needs to be put directly on your C: drive and the front end can go anywhere.

    If you open them both at the same time. The front end will stay open. But if you click the button "Log out all users" on the back end, you'll notice that a message appears on the front end, with a count down to when the database will exit. It will then exit.
    Last edited by Goldy; 08-04-06 at 14:59.

  7. #7
    Join Date
    Aug 2006
    Posts
    12
    Now what if I put this Back End on a shared network drive, would I just have to import the table after I create the split?

  8. #8
    Join Date
    Feb 2004
    Posts
    90
    The common way people split Access databases is to have the backend (which only contains the data...i.e. the tables) on a shared drive and to have the frontend put on each user's local machine. The front end contains all the forms etc, but no actual tables...only linked tables to the backend.

    Like in my download example.

    If you do do it this way, it's often a good idea to build in an automatic frontend update feature, so that if you develop the frontend, it will propergate to all the users local machines. You can set this up in a similar way to my download example, but instead of causing the frontend database to quit, it brings in an updated version of the frontend from your shared network drive. Again, this is the way I do it. I'm sure there are other methods.

    There are also other ways to split an Access database, but you'll have to read up on them and decide what is best for your database (it often depends on factors such as network speed, amount of data being inputted etc).

  9. #9
    Join Date
    Aug 2006
    Posts
    12
    I went ahead an impoted the tables and forms into my database. Do I have to change any oo the code to make it work.

  10. #10
    Join Date
    Feb 2004
    Posts
    90
    Is it working?

  11. #11
    Join Date
    Aug 2006
    Posts
    12
    No, not through out only on my desktop.

  12. #12
    Join Date
    Aug 2006
    Posts
    12
    What is happening is the Force_Logout is not loading when the database opens. How do you force it to open with the database?

  13. #13
    Join Date
    Feb 2004
    Posts
    90
    In your instance it depends, because you mentioned that you already have your own bespoke log on method. Which probably means that you are you using a form (rather than the in-built security feature of access) for users to log on.

    If this is the case you need to check what form is currently being loaded on start-up. To do this go to:

    Tools > Startup

    And see what form is set to load on start-up. It's selected in the drop down menu called "Display Form/Page"

    Also look in your macro section to see if there is a macro called "autoexec". If this is the case, view it in design mode and see what form is set to open on start up.

    Then once you know that, I can talk you through how to load the Force_Logout form, and have it hidden (so users can't close it) and also open your bespoke log in form as well.
    Last edited by Goldy; 08-04-06 at 15:31.

  14. #14
    Join Date
    Aug 2006
    Posts
    12
    Goldy,
    I'm sorry I didn't get back with you sooner. My son just graduated from boot camp so I had to take some leave from work. You were right I did have a form login and I had to add an autoexec to make it run. I came back to work this monday and deployed the database with no problems.
    Thanks Useman

Posting Permissions

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