How to Kick Users out of Your MS Access Database

Поділитися
Вставка
  • Опубліковано 29 лис 2024

КОМЕНТАРІ • 58

  • @YvesAustin
    @YvesAustin Рік тому +1

    Thanks!

  • @seanmackenziedataengineering
    @seanmackenziedataengineering  Рік тому +3

    Some notes: Server databases usually have a feature for this, but MS Access does not have it unless you program it yourself. Some situations *will* prevent the user's copy from shutting down. This includes a user leaving some message box pop up open, but not clicking any button on it. However, most of the time, this will shut them down just fine. You can tailor and clean up your notification form to your liking. Depending on your design, you may want to issue a few save and/or close commands before the system closes with DoCmd.Quit. I have used this (or very similar) deployments in production settings and it works awesome. Especially for taking care of that one user that always stays logged in!!

  • @danielazzam
    @danielazzam Рік тому +3

    You made my day!
    This has been a pain in my ass
    Each time I wanted to modify tables in my BE , I had to call all users one by one and ask them to quit their copies of FE since they would be locking my BE
    Thank you for this video , Much appreciated .

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому +1

      Awesome, that's great! Glad it worked for you. I remember the first time I tried this and was able to shut down about ten other users' front-end copies after hours so I could make changes to the system. Better than having to call them!

  • @tomfry3147
    @tomfry3147 Рік тому +1

    Very useful tip. I've oftern been frustrated by users not logging out of my Access database. Not any more ....thanks to you.

  • @stanTrX
    @stanTrX 10 місяців тому +1

    Hi Sean, thanks for another helpful video. How can we prevent our fe users to play around wih our backend tables. In your example, kick out system table for instance?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  10 місяців тому

      For starters, you can set your startup options ua-cam.com/video/M6VxBY9mt_s/v-deo.html and disable the bypass key ua-cam.com/video/DHqOZsH5u5o/v-deo.html Those are good steps. There is more you can do also like add a password hash ua-cam.com/video/2VrFXQd7xDQ/v-deo.html but the first two links can get you started.

  • @paulskelton8799
    @paulskelton8799 Місяць тому +1

    This is great, thanks for sharing your knowledge

  • @simonmaersk
    @simonmaersk Рік тому +2

    Great video with useful tips, thank you!
    I chuckled a little every time you said "kick users back end" 🤣

  • @minhajabbasy9582
    @minhajabbasy9582 Рік тому +1

    Very nice video. Keep up the good work. Stay blessed.

  • @DataisKing
    @DataisKing Рік тому +1

    Wondering if you have ever transferred Access Tables into Dataverse using the wizard? When I tried, it did not transfer over any number columns.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      Interesting.. I have not heard of that issue. Did it replace any with GUID? I'll be taking a much closer look at Dataverse in upcoming episodes.

    • @DataisKing
      @DataisKing Рік тому

      @@seanmackenziedataengineering I'm not sure. I can only use Dataverse thru Teams because I don't have a license. I created this video that shows the process that I went thru to connect Access to Dataverse in Teams. ua-cam.com/video/NTM1u54Fm_o/v-deo.html

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      @@DataisKing I'll check it out!

  • @brentditto143
    @brentditto143 8 місяців тому +1

    is there any way for force close a front end DB that is an accde file? I made the file accde to limit what end users could do, but then it stops all vba.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  8 місяців тому

      The code in this video should work for your purpose. Make sure that you ran a debug > compile in VBA with Option Explicit on so that you catch any little typos or problems in the code. If it won't compile, that is probably why. Then recreate your accde.

  • @mauriciobick9855
    @mauriciobick9855 Рік тому +1

    Pretty cool Sean.
    Thank you for sharing.
    What would be cool is to have a countdown text box or label.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      That would be a good feature!

    • @mauriciobick9855
      @mauriciobick9855 Рік тому +1

      @@seanmackenziedataengineering could you show us how it’s done?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому +2

      You can just add a few lines of code to zfrmSystemExit so it looks like this:
      Option Compare Database
      Dim intCountDown As Integer
      Private Sub Form_Open(Cancel As Integer)
      intCountDown = 11
      End Sub
      Private Sub Form_Timer()
      intCountDown = intCountDown - 1
      Me!Label0.Caption = "The system will exit in " & intCountDown & " seconds.."
      DoEvents
      If intCountDown = 0 Then DoCmd.Quit
      End Sub
      Important: Then change the form timer interval value from 10000 to 1000
      You will see the message in the pop-up decrease 1 second from 10 to 1 until closing.

    • @miles6875
      @miles6875 Рік тому

      @seanmackenziedataengineering Will never take for granted the high quality responses you give to your viewers. Thank you Sean

  • @kyopan23
    @kyopan23 6 місяців тому +1

    How would you execute the code if you want to kick users out that have been idle for an estimate amount if time?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  5 місяців тому

      There's a challenge! I think you would probably need some kind of event in your app that would reset an inactive flag (maybe every time they hit OK or something like that). If they are inactive for x minutes/hours then gracefully shut down.

  • @charlieweller3403
    @charlieweller3403 5 місяців тому +1

    I have done this with my database. I have it saved on a shared server where around 15-30 people all use the front end at once. I try to kick them out using this but somtimes it doesn't work or it might just kick 1 or 2 peope out. Do you know why this might be?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  5 місяців тому

      First, make sure all the users are using a db copy that has your new logic. If your app is a style that has a lot of modal pop-ups then they will interfere with the shut-down process, ie: Are you sure you want to close that form? That will stop the shut-down process. Design-wise, you want to convert that kind of behavior to use custom pop-ups that will still close on a shut-down command. Also, you may have an app where users can leave a form open (say a big data entry form) in an un-validated state. You will want to start modifying those forms so that they can exit gracefully unattended. Those kind of situations can cause issues but you can design for it.

  • @10secondslearning4
    @10secondslearning4 Рік тому +1

    Tried this, worked great but now front ends close regardless of backend box been ticked or not. Any solution?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      That seems strange - can you post the code you used? We can take a look.

    • @10secondslearning4
      @10secondslearning4 Рік тому

      @@seanmackenziedataengineering I created every form and used the exact same code you used in the video so that there wasn't anything different except I put 60 secs on the timer to open the message window with 30secs to closing.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      @@10secondslearning4 Make sure that your system table is in the backend database and that your front ends all link to it. It sounds like they are not reading the backend table, so they do not see the changed value there.

  • @jonjcapps
    @jonjcapps Рік тому +1

    I am working on moving my tables to Dataverse (a few tables at a time, as I am not sure the consequences are) How can you tell if a user has a FE open and you want to boot them out and update their FE client of Access and not have a record be damaged in DataVerse?

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      You can use the method in this video because it will boot all users, and it does so by just reading the remote table (in your case in Dataverse). You can't really tell if a certain user has the file open in this example, BUT it is easy to extend this logic to also monitor users and kick them out individually. Just extend the table in this video to include a field and row for each user. When the user copy checks to see if it should stay open, just change the query to only check the row with their name in it.

  • @giuseppepelella2650
    @giuseppepelella2650 Рік тому +1

    I will give a go
    Is it possible to know which user has left the backend open? This is To kick them personally afterwards

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      Ha! Many times I was in the same situation. Yo can read the lock file with a text editor and you can see the computer name and the security name in the Access context, which is usually Admin unless you enabled some Access security. So you might see WORKSTATION-001 Admin or something like that. If you know who is at that workstation then you are good to go..

  • @mikewashington4188
    @mikewashington4188 Рік тому +1

    Great technique

  • @botskie2354
    @botskie2354 Рік тому +1

    hello Sean, can you give us an example like when open a form with with date value but the value of that date is auto default date which is every end of the month , like January 31, 2022 , February 28, 2022 and son and so fort.... hope you read this and I'm glad if you help through this... thank you and god bless

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  Рік тому

      Do you mean that user(s) open the form to work in, and the date field is always the last day of the current month?

    • @botskie2354
      @botskie2354 Рік тому

      @@seanmackenziedataengineering yes your right that what i want make in the form... but I dont know how make it...

    • @botskie2354
      @botskie2354 Рік тому

      it also a big help for me if you do it thru vba code

  • @j.dasilva4567
    @j.dasilva4567 14 днів тому +1

    Top.

  • @deniscloutier383
    @deniscloutier383 Рік тому +2

    Merci!

  • @SamuelTondé
    @SamuelTondé 3 місяці тому +1

    Salut. Très interessant mais je souhaite une version en francais ou soustitré en francais.

    • @seanmackenziedataengineering
      @seanmackenziedataengineering  3 місяці тому

      Mon français n'est pas assez bon pour cette tâche. Je peux peut-être faire des recherches sur les sous-titres. :-)

  • @ssdusd
    @ssdusd Рік тому +1

    Awesome 👌

  • @interestingamerican3100
    @interestingamerican3100 Рік тому +1

    Commenting for the algorithm.

  • @jerzykepinski
    @jerzykepinski Рік тому +1

    this is goood

  • @gerfer6261
    @gerfer6261 Рік тому +1

    Good back side kicker😂🤾
    I have a similar one monitors text file name ( of course from mr. google)
    But this is much simpler
    One issue I encounter is if user left the terminal in edit mode without exiting the field then the issue exists
    I have to give this one a go
    Sounds great 🎉🎉🎉
    Merry Christmas ( don’t disturb till next year😅 please)
    Good on you mate sharing your knowledge throughout