Results 1 to 13 of 13
  1. #1
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24

    Delete Table from database when it is in use by another user

    I am creating a database that will be used by several others. They will each have a shortcut to get to the database.



    I need to be able to close and delete a table, say "table 1", from the database even if that table is opened by another user.

    Is this possible?
    Any help is appreciated.

    Thanks Dan

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Do you have any problem kicking the other users off of the system?
    http://www.accessmvp.com/JConrad/acc...e/kickoff.html

  3. #3
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24
    Thanks for the link, it will come in handy in the future. But as of now I do not want to boot the users off. I actually wanted each user to have the abillity to delete the table whether or not another user is using it.

    I will give a background as to what I am doing, perhaps there is a better way of doing it.

    There is a form where users use comboboxes to choose a certain field. Then they can click a button to provide a sum of the values. Based off of the values in these combo boxes, a certain database will be connected and then the values are summed and stored in a table in that database. Now the table that stores these sums is imported into the front end database and stored into a table I call "TemporaryTotal". So essentially this "TemporaryTotal" table will be created based off of the selections in the comboboxes, therefore it can take on all sorts of different records.

    Now if a user has this "TemporaryTotal" table open and is looking at values, I want a second user to be able press a button that will send the first user a msgbox that says "This table will be closed and modified in 1 minute, export it to excel if you wish to save the data." Then after one minute the table is deleted and modified to user 2's data and now user 2 has the "TemporaryTotal" table filled with his data to do with as he pleases.

    I have code already that works if only one user is using it. So the table will close and be modified to take on new data and reopened at the press of a button.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    We may be having a problem with terminalogy. Every user should have their *own* copy of the FrontEnd so I would think deleting the table would not be a problem.
    http://www.accessmvp.com/TWickerath/.../multiuser.htm

  5. #5
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24
    Yes I misused the term front end. I meant it in a sense that it is a front end used to connect to several other databases. But it still contains tables. So This "front end" as I called it, will contain the "TemporaryTotal" table that is being modified.

  6. #6
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24
    So this "front end" is a fully functionally database and each user will have a shortcut to it. Therefore all users will be logged into it at the same time.

  7. #7
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24
    Now I suppose I could provide a copy of the front end to each user instead of a shortcut. But then if I had to Update the "front end" every user would have to be provided with this new version.

  8. #8
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    That is what free tools like this link are for: http://www.btabdevelopment.com/ts/freetools

  9. #9
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24
    Okay perfect thank you very much.

    One last question:

    If I actually split my so called "Front end" into a front and back then each user can create there own "TemporaryTotal" in their front end.

    But using their version of the front end can they all update and add values to the back end so that each user can see the changes another user made?

  10. #10
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24
    And if I use CurrentDb in the code will it refer to the front end or the back end?

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by Danielwy View Post
    But using their version of the front end can they all update and add values to the back end so that each user can see the changes another user made?
    Yes, but you would need to refresh or requery the table.
    CurrentDB is the db that is executing.

  12. #12
    Danielwy is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2011
    Posts
    24
    Thank You.

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Glad we could help.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 20
    Last Post: 08-08-2011, 01:34 PM
  2. Replies: 11
    Last Post: 03-30-2011, 01:08 PM
  3. Replies: 0
    Last Post: 09-18-2009, 07:33 AM
  4. New Database - New User
    By mcarrigg in forum Database Design
    Replies: 1
    Last Post: 06-21-2008, 04:56 PM
  5. Delete all records in a table?
    By bob646 in forum Access
    Replies: 1
    Last Post: 05-20-2007, 11:41 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums