Results 1 to 4 of 4
  1. #1
    LukeBatty is offline Novice
    Windows 10 Access 2016
    Join Date
    Apr 2017
    Posts
    6

    Sending a message to all users that have a database open


    I would like something that when i press a button it will send a message and tell them that they need to close the database
    IE: if user1 = true then
    msgbox "Please close the database"
    end if

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,523
    Use an instant messenger or email.
    I tired this:
    I have a tConfig table, in it are various field used to configure the db, and 1 is Shutdown (t/f)
    when a user closes a form it checks, tConfig.Shutdown if true, then posts the message and quits.
    the only downside, you must put the Check4Shutdown() routine in many places....
    in the FormClose, when they close a form,
    in the menu button click, so they dont start any more operations,
    and in any more places you use.
    If they sit on a form and/or do nothing , they wont get any message.

    Code:
    sub Form_close()
    Check4Shutdown
    end sub
    
    sub Check4Shutdown()
     if Dlookup("[ShutDown]","tConfig") then
       msgbox "shutting down"
        docmd.quit
    end if
    end sub
    Last edited by ranman256; 05-23-2017 at 06:08 AM.

  3. #3
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Here's a site with a number of examples for doing this kind of thing:

    Kick Users Off - Detect Idle Time

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    HiTechCoach's Avatar
    HiTechCoach is offline MS MVP - Access Expert
    Windows 10 Access 2013 32bit
    Join Date
    Jul 2010
    Location
    Oklahoma, USA
    Posts
    702
    Quote Originally Posted by LukeBatty View Post
    I would like something that when i press a button it will send a message and tell them that they need to close the database
    IE: if user1 = true then
    msgbox "Please close the database"
    end if
    Can we assume this is a properly split database with each user having their own (not shared) copy of the front end?

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

Similar Threads

  1. Replies: 2
    Last Post: 03-29-2017, 12:52 PM
  2. Replies: 6
    Last Post: 09-30-2015, 03:14 PM
  3. message pop up for users when database opens
    By ecalvert47462 in forum Access
    Replies: 8
    Last Post: 10-18-2012, 11:39 AM
  4. Sending message within access
    By winterh in forum Access
    Replies: 2
    Last Post: 04-01-2012, 03:47 PM
  5. Replies: 1
    Last Post: 01-04-2008, 11:40 AM

Tags for this Thread

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