Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   Templates   Seminars   TechHelp   Forums   Help   Contact   Join   Order   Logon  
 
Home > TechHelp > Directory > Access > Kill Access < Toggle Close Button | DLookup Tricks >
Back to Kill Access    Comments List
Pinned    Upload Images   @Reply   Bookmark    Link   Email  
Transcript
Richard Rost 
          
3 months ago
Welcome to another TechHelp video brought to you by accesslearningzone.com. I am your instructor Richard Rost. Today, we're gonna talk about how to kill Access. I'm like Kill Bill. If you got a database misbehaving and it's just behaving often and you can't figure out why it locks up, well, we're gonna make a quick little batch file that you can use to kill any and all running instances of Access. You can really use this to kill anything you want, any many Windows processes that are running, instead of having to open up the Task Manager. Let's see what the question is.

Today's question comes from Lucas in Knoxville, Tennessee, one of my platinum members. Lucas says, "How do I deal with Microsoft Access when it keeps freezing or not shutting down properly? I seem to have a database issue where Access just won't close sometimes and is still running in the background. I end up having to open Task Manager and manually end the task, which is a bit frustrating to do multiple times a day. Is there a simple way to create something like a batch file or a program that can automatically kill Access when it starts acting up so I can get back to what I was doing without all the hassle?"

Yeah, I seem to have this recurring problem too. It's like every other time I do an Office update, they introduce something that causes some of my even simple databases to just not shut down. You close Access and it looks like Access shuts down, but MSACCESS.EXE is still running in the background, and I have to go in there and kill it. I've had this happen myself too. It's random. It happens once in a while, but yeah, it'd be nice to have a little shortcut on your desktop that you can just double-click, and there it goes. It'll kill Access for you.

Alright, so before we do this, for anyone who is not familiar with how to use the Windows Task Manager, go watch this. It's basically a program in Windows, part of Windows 10, 11, goes way back, and you can use it to see all of the tasks that are running, all the programs that are running, and you can right-click on it and end the task to kill one of them. But you have to do it manually.

Alright, so we're gonna see how to do it with a command with a batch file. Alright, so let's say I got my database running. It's just sitting here minding its business, and let's pretend it locked up. It's hard to actually make it lock. I mean, I could make it lock up with an endless loop and some VBA, but we don't need to go that far. Let's just pretend it locked up.

So you can either run it—I keep an icon for it on my taskbar all the time, but it's Control Shift Escape, or you can go Control Alt Delete and select Task Manager, or you can find it on the start menu, whatever works for you. There are millions of ways to do the same thing in Windows and Access, and here it is right here, Microsoft Access. It's running. You can see in here TechHelp free template.

Now, what you have to know is the actual name of this application. If you right-click on it, go to properties, this thing pops up. That's what you're looking for right there: MSACCESS.EXE. Right, that's the name of that application. Alright, so now that we know that, we can open up a command prompt and then we can kill it with the taskkill command. Again, I keep a shortcut to a DOS prompt on my taskbar, but you can just open up any Windows Explorer folder, go to where you want to put this file, and type CMD. And that'll open up a nice little command prompt. It opened up on my other window. It's right there.

Okay, now I'm gonna minimize that guy. Here is what the command looks like. You ready? You run this from anywhere: it's taskkill space /F. That means forcefully kill this task. Alright, so it won't bother you with prompts or ask any questions or blah blah blah. Then it's /IM, the name of the image, basically the name of the file you want to kill, right? And it's gonna be MSACCESS.EXE. Ready? Boop, gone. Okay, that's it. It terminated all of your Access databases that are running. I just did it again with two databases open, two copies of the database, same thing.

Is there a way to kill a specific one? Yes, but it's a lot more complicated. If you guys really want to see that, let me know, maybe I'll make an extended cut with that information. Now, I don't know about you, but I'm not gonna remember that unless I look it up. So that's why it's handy to put that inside a little batch file.

So I'll go back to that folder, right-click, we'll go to new and then text document down the list where you have to find it. Alright, I'm gonna call this killaccess, and it's a not text file for now. That's fine, I'll rename it in a second. Open it up. Alright, and in here, put the same thing I just told you to put in there before: right taskkill /F /IM MSACCESS.EXE. Right, save it. Close it and we're just gonna rename this guy .BAT batch file. Okay, rename yeah, okay, that's fine. Alright, now we have a batch file. I'll do the same thing, ready double click and okay Windows protect it. I'm gonna do it, more info, and then run anyway.

The first time you run that you're gonna see that—it's Windows being cautious because you're running a batch file that could potentially delete files and do harmful things. After you run it the first time you shouldn't be bothered again. Now, it is running. It's just running on my other screen and it happens so fast and then it goes away. If you want to be able to actually see some kind of confirmation, right in here just put pause.

Alright, so I'll save that, close it, and now when I run it there's the window—it opened up on my other screen—there it is right now. This time it says the process MSACCESS.EXE can't be found because it's not running. Then press any key to continue, press enter, there you go. Let me launch my database again and move it over here, and then I'll run my little batch file, and boop, gone, and there it is. Yeah, this is opening up on my primary screen which is down off the video window, but that's it. That's all you have to do. Now you can just take this little guy, drop a shortcut to it—great shortcut right there on your desktop wherever you want it—and now you can just run this, and then anytime you want it will just quickly kill Access, and you could even restart your database if you want to.

You can put it in here to restart the database. Right, just put another line after that one that says MSACCESS.EXE, you need the full path to it, space, and then the full path and file to your database if you want to restart it. I'm not gonna do that right now.

Now, would you like something a little more user-friendly, like maybe—let me drop this over here—maybe something like this and it says, "Are you sure you want to kill Microsoft Access?" Then you say yes, and then it says Access killed. Well, that we could do with a little more coding and something called VBScript, and I'll show you how to do that in the extended cut for the members. Silver members and up get access to all of my extended cut videos. And yes, I know some of you are probably thinking if you've heard VBScript is going away eventually. It's got a few years left. You can do something similar to this using PowerShell. It's a little more complicated, but if you guys really want to see it in PowerShell too, let me know. Maybe I'll do another video.

And if you have a Microsoft Access database that runs around the clock and does some important stuff like I do, I still have a database in my office that runs. It does things like sending emails out, it checks my website, and it does maintenance-type stuff. It's running 24/7 on a timer on a loop, which I showed you guys how to do. Well, if that thing locks up I want to know about it, but first I have this thing that I built called the Access Watchdog that watches the database, makes sure it's running. If it stops running, it'll try shutting it down and then restarting it. So that's the Access Watchdog. Yes, those are my puppies right there. That's Carter and that's Cooper. They're good boys. Do you want to learn more about this? Here's the link right there.

But there you go, that's how you kill Access with a simple little batch file. That's gonna be your TechHelp video for today. Hope you learned something. Live long and prosper, my friends. I'll see you next time.

TOPICS:
Creating a batch file to kill Microsoft Access  
Using taskkill command in Windows  
Determining process name for Access  
Converting text document to batch file  
Running a batch file in Windows  
Using 'pause' in a batch file for confirmation  
Creating a desktop shortcut for the batch file

COMMERCIAL:
In today's video, we're discussing how to handle a misbehaving Access database that just won't close. If Access keeps freezing or isn't shutting down properly, don't worry, we've got a fix. You'll learn how to create a simple batch file to kill any running instances of Access without opening Task Manager. Additionally, we'll discuss how to make a more user-friendly tool via VBScript for those who want a polished solution. If you're interested, I'll also touch upon the Access Watchdog for databases running 24/7. You'll find the complete video on my YouTube channel and on my website at the link shown. Live long and prosper my friends.

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Kill Access.
 

 
 
 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2025 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 6/21/2025 8:13:25 PM. PLT: 1s