Results 1 to 5 of 5
  1. #1
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591

    Single User Database


    I need to answer a simple question just put to me. Another department has a database designed for a single user at one time. When one person is using it, everybody else needs to stay out. All I need to know is either how to keep more than one user from using the database at a single time or have the database bark at them instead of them barking at each other, which is apparently how they are doing it now. Even better would be to tell them which user is in the database so they could politely request the user to get out.

  2. #2
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    Make a new table with one field in it. In the field you put "LoggedOut"

    When someone logs into the system you make a SQL update that changes the value "LoggedOut" to "LoggedIn".
    When someone leaves the system you let another SQL update change it to "LoggedOut".

    If someone else opens the application, you check the value of the field with Dlookup.
    Off course when the Dlookup returns "LoggedOut" you let them enter the application by code that loads the form.
    When the value is "LoggedIn" you return a messagebox "A user is currently using the application" and exit the application using code.

    This is very basic stuff, but you can even let the system send an email as soon as someone logs off

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    When the db opens you could have it search for an laccdb file in the db directory.

  4. #4
    Paul H's Avatar
    Paul H is offline Expert
    Windows XP Access 2010 32bit
    Join Date
    Sep 2011
    Location
    Richmond, VA
    Posts
    591
    Thanks Jeroen. I like simple.

    Also thank you ItsMe. It's always nice to have a backup plan.

  5. #5
    JeroenMioch's Avatar
    JeroenMioch is offline Competent Performer
    Windows Vista Access 2010 32bit
    Join Date
    May 2012
    Location
    Den Haag, Netherlands
    Posts
    368
    Tomorrow i am at work and could provide you with the codes if you like

    Glad to be of help

    Greetings: Jeroen

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

Similar Threads

  1. Replies: 1
    Last Post: 07-20-2012, 05:35 PM
  2. single form multiple database
    By sms2720 in forum Programming
    Replies: 7
    Last Post: 12-14-2011, 01:26 PM
  3. Split Database only allowing single user access
    By terricritch in forum Database Design
    Replies: 2
    Last Post: 11-08-2011, 11:12 PM
  4. Replies: 20
    Last Post: 08-08-2011, 01:34 PM
  5. Replies: 1
    Last Post: 01-29-2011, 10:52 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