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 > Self Destruct < Startup Form | Replication ID Foreign Key >
Self Destruct
By Richard Rost   Richard Rost on LinkedIn Email Richard Rost   3 years ago

Create a Database That Will Self-Destruct in 24 Hours


 S  M  L  XL  FS  |  Slo  Reg  Fast  2x  |  Bookmark Join Now

In this Microsoft Access tutorial I'm going to teach you about a seldom used and lesser known feature of Microsoft Access and that is to allow you to have your database self-destruct after 24 hours. Why would you want to do this? Well you might have sensitive information in the database and you only want to give users the ability to view it for a limited time. Or you might want to give someone a sample of the database just so they can try it out but not use it without paying for it. In any case this feature will allow you to have the database erase itself in one day.

Pre-Requisites

Links

Recommended Courses

Members

There's no extended cut, but here's my database file:

Learn More

FREE Access Beginner Level 1
FREE Access Quick Start in 30 Minutes
Access Level 2 for just $1

Free Templates

TechHelp Free Templates
Blank Template
Contact Management
Order Entry & Invoicing
More Access Templates

Resources

Diamond Sponsors - Information on our Sponsors
Mailing List - Get emails when new videos released
Consulting - Need help with your database
Tip Jar - Your tips are graciously accepted
Merch Store - Get your swag here!

Questions?

Please feel free to post your questions or comments below or post them in the Forums.

KeywordsSelf Destruct Your Database in Microsoft Access

access 2016, access 2019, access 2021, access 365, microsoft access, ms access, ms access tutorial, #msaccess, #microsoftaccess, #help, #howto, #tutorial, #learn, #lesson, #training, #database, self destruct database, auto delete database, database timeout, Self Destruct Code, Self-Destructing Data 

 

 

 

Comments for Self Destruct
 
Age Subject From
3 yearsActive Clock with Current DateBrian Hartwig

 

Start a NEW Conversation
 
Only students may post on this page. Click here for more information on how you can set up an account. If you are a student, please Log On first. Non-students may only post in the Visitor Forum.
 
Subscribe
Subscribe to Self Destruct
Get notifications when this page is updated
 
Intro In this video, we will talk about the concept of creating a self-destruct feature for a Microsoft Access database, inspired by an April Fool's joke. You'll see how to simulate a database that erases itself after a set period using VBA programming and the timer event, and get useful ideas for giving users limited-time demo databases or protecting sensitive information. We'll also discuss techniques like using delete queries, hiding database objects, and launching batch files or other databases from Access.
Transcript Welcome to another Fast Tips video brought to you by accesslearningzone.com. I am your instructor, Richard Rost.

In today's video, we are going to talk about a seldom used and lesser-known feature, almost a hidden feature of Microsoft Access, that allows you to have your database self-destruct after 24 hours.

Why would you want to do this? Maybe you have sensitive information in the database and you only want to give users the ability to use it for a limited time, or you might want to give someone a sample of your database so they can try it out before they buy it. In any case, this feature will allow you to have the database erase itself after one day, or whatever interval you set.

How do you do this? This only exists in a Microsoft 365 subscription. You go to File, then come down to Options, and then go to the Current Database tab and scroll all the way down to the bottom. You will see this option down here, right at the bottom, called Self-Destruct. Just click on the Enable box next to that, then hit OK and restart your database.

Now, when your database starts up, nothing will appear to happen because you do not want to use it and necessarily know it is going to self-destruct in 24 hours. But you will find that you now have a self-destruct form right there. If you open it up, there is the clock, and you can see it is counting down. You can set the options for how long you want it to count down, up to 24 hours, but you can make it less than that.

In fact, I have some VB code in this button right here that I have to bring it down to 10 seconds just so I can show you what happens when it is getting ready to self-destruct. Are you ready? I am going to click on the button. Now we are at 10 seconds. We will see what happens here when the database actually self-destructs. We are at 3, 2, 1.

Did I get you? I figured last year I did something kind of cruel and a lot of people were mad at me. So this year it was something pretty easy. April Fool's, everyone.

With that being said, just like last year, there was a little bit of truth to my April Fool's joke. There is also some truth to this one. While this is not a built-in feature in Access, yes, I made this screen up in PowerPoint with a little graphics editing. That is all me.

If you do want your database to self-destruct, and you want to give a sample database to someone so they can check it out, there are things you can do with a little bit of code to do what I just did. I just programmed this up in like half an hour. Let me walk you through what I did.

First of all, I am going to shut down the main menu because the main menu has the timer running in it. This is just another little form with the picture in it.

Here is what I did. In the global module here, I set up three variables. There is HMNS - hours, minutes, and seconds. I made it global so that every form in the database can use it. Then the main menu, when the main menu loads up - go to Design View - there is an On Load event right here. That On Load event sets the timer to whatever I want: 23 hours, 59 minutes, 59 seconds.

There is a Form Timer event, which you can see right down here, Form Timer event. That runs every second. That is a thousand milliseconds. It runs a timer event. All the timer event does is, once each second, it counts down. If hour is zero, minute is zero, and second is zero, it opens up the AF, which is my April Fools form - that is the Captain Picard form - and it closes down the self-destruct form, which is the one with the clock on it. Then it exits out.

I should probably add in here, Me.TimerInterval equals zero. That shuts the timer off too, so the timer does not keep running even after the clock has run out.

This just here, this just counts it down. It says seconds equals seconds minus one. If seconds is negative one, then drop one off the minute, reset the seconds to 59. If minutes is negative one, drop one off the hour, reset the minutes to 59, and so on. That is just your counting down clock right there.

Here is my button to set it to zero hour, zero minutes, ten seconds. My little fake button there. Well, it is not fake, it really does it.

If you want to learn more about the timer event programming, I have got a video on that, how to make a reminder pop up. Go watch this, I will put a link down below.

If you want to make a demo version of your database, run through my Simple Security video. This will teach you how to do things like hiding sensitive objects. You can hide your forms and your tables, you can hide your navigation pane, you can disable the ribbon. You can make an execute-only version of the database.

If you have sensitive data in the database that you also want to self-destruct, you can use a delete query. When that timer runs down to zero, run a delete query and it will delete all the data in your tables. You could even, if you wanted to, shell out to another database that could delete your primary database, or you could shell out to a batch file, if you know how to write a batch file, but you can make one Access database delete the other one. I cover that in my Database Launcher video, how to get your Access database to launch another database.

Finally, if you do want to self-destruct the database, but you want to give someone a paid version, and if they do not pay, like a monthly subscription, you could have it time out if they do not pay their bill by, like, the fifth of the month. You can force them to have to call you to get a code or email you. I do have a seminar called my Registration Seminar that helps you do that. It gives them a code, and they have to call you to get the code.

Yes, while the self-destruct feature was an April Fool's joke, you can pretty much do something like this. It is not a built-in Access function, but with a little bit of creative VBA programming, you can do pretty much anything with Microsoft Access.

April Fool's! I hope this entertained you if nothing else. Live long and prosper. We will see you next time.
Quiz Q1. What was the primary topic discussed in the video tutorial?
A. Creating relationships between tables in Access
B. Making a self-destruct feature for an Access database
C. Building queries to summarize data
D. Setting up database user permissions

Q2. In which version of Access did the instructor CLAIM a self-destruct feature was available as a built-in option?
A. Access 2016
B. Microsoft 365 subscription version
C. Access 2013
D. Access Online Web App

Q3. What was the real purpose of demonstrating the "self-destruct" feature in the video?
A. To show a legitimate built-in feature of Access
B. To explain how VBA macros are written
C. As an April Fools joke, but with a teaching element
D. To promote Microsoft 365 subscriptions

Q4. What did the instructor use to visually create the self-destruct countdown form shown in the video?
A. An Access wizard template
B. A screen from Excel
C. PowerPoint with some graphics editing
D. A feature from SQL Server

Q5. What programming technique did the instructor use to simulate the countdown timer in the database?
A. Macro actions
B. SQL triggers
C. The Form Timer event and VBA code
D. Linked server scripts

Q6. According to the instructor, how does the Form Timer event work in this context?
A. It lets the user start a manual countdown
B. It runs code once per second to decrease the timer variables
C. It closes the database every five minutes
D. It refreshes data from the server every minute

Q7. If the countdown reaches zero, what could the self-destruct code actually do in a real implementation?
A. Lock the user out of Windows
B. Run a delete query to erase sensitive data
C. Shut down the entire computer
D. Send an automatic purchase order by email

Q8. What additional approach did the instructor mention for creating a demo or limited-use database?
A. Encrypting the entire application using built-in tools
B. Using Access user-level security (now deprecated)
C. Hiding forms, tables, the navigation pane, and disabling the ribbon
D. Exporting the data as a PDF

Q9. What idea was suggested for enforcing payment for a paid version of a database?
A. Requiring a code from the database author to extend use
B. Sending users weekly reminders via email
C. Reporting usage directly to Microsoft
D. Locking the workstation until payment is made

Q10. What is the main message about the possibility of a self-destruct feature in Microsoft Access?
A. It is a built-in feature in all modern versions of Access
B. It is only available for enterprise users
C. You can create it yourself using creative VBA programming
D. It is not possible at all within Access

Answers: 1-B; 2-B; 3-C; 4-C; 5-C; 6-B; 7-B; 8-C; 9-A; 10-C

DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks.
Summary Today's Fast Tips TechHelp tutorial from Access Learning Zone explores a fun yet instructive idea in Microsoft Access: how you might set up your database to self-destruct after a set amount of time. While Access does not have a real built-in feature for this, the concept has some practical uses, such as protecting sensitive data or distributing a time-limited demonstration version of a database to your users.

You might be wondering about real-world situations where this would make sense. Sometimes, you may want to allow someone access to your data only for a short period, or you could be offering a trial database that disables itself unless the user purchases the full edition.

Now, let me clarify from the start that there is no official Microsoft 365 option to make your Access database self-destruct after 24 hours. What I demonstrated in this April Fool's tutorial was designed using PowerPoint for the animation and interface, not by actually enabling a hidden Access feature. However, the underlying concept holds real value, and you can create similar effects yourself with some Visual Basic coding.

Let me break down how I approached creating the self-destruct sequence as an example you can build on. The timer logic involves global variables for hours, minutes, and seconds, so you can keep track of how much time the user has left no matter which form is open. In the main form's load event, you set the target timer (for example, 24 hours, but you can choose any interval you wish). Then a timer event is used to update the countdown, reducing the seconds and shifting minutes and hours as needed.

When the timer hits zero, you can program the event to trigger whatever action you want. My example had it display an April Fool's graphic for laughs, but a real deployment could close forms, restrict access, delete sensitive information, or display a notification. You can also enhance the logic by disabling the timer after the sequence completes, to avoid unnecessary processing.

If you want to experiment with such a timer event in Access, I recommend exploring my video on timer events where I demonstrate how to pop up reminders automatically. For turning your database into a demonstration copy that has security features, my Simple Security video gives in-depth instructions about hiding tables and forms, locking down the interface, and even creating execute-only versions.

If your intention is not just to lock the user out after the period ends, but to erase sensitive data, you can use a delete query triggered when the timer finishes. More advanced users might trigger another database or a script to manage deleting the database file itself, a technique I explain in my Database Launcher video.

Finally, if you have a need for subscription-based control or want your users to contact you for activation after a demo period, I address that topic with my Registration Seminar. This system helps you generate and validate unlock codes and can turn your time-limited demo version into a powerful sales and security tool.

To sum up, while Microsoft Access does not offer an official self-destruct option, you can mimic the behavior quite closely with creative use of timers and VBA code. You can set up a time limit, trigger messages, restrict access, or even wipe out data according to your needs.

You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends.
Topic List Creating a self-destruct timer form in Access
Using global variables for countdown logic
Programming the Form Timer event in Access
Countdown timer decrement logic for hours, minutes, and seconds
Triggering forms to display messages when time expires
Stopping the timer after countdown completes
Using a button to set the countdown to a custom duration
Running a delete query to erase sensitive data when timer expires
Shelling out to a batch file or another database to delete files
Making a demo version of an Access database with time limits
 
 
 

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 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 1/15/2026 10:17:34 AM. PLT: 1s
Keywords: FastTips Access Fast Tips self destruct database, auto delete database, database timeout, Self Destruct Code, Self-Destructing Data   PermaLink  Self Destruct Your Database in Microsoft Access