Expire Database

hmongie

Registered User.
Local time
Today, 07:01
Joined
May 17, 2003
Messages
99
I am looking for a way to put an expiration date on my database. Exactly what I want to do is be able to set a date so that when it reaches that date the database will be disabled. If anyone can show me exactly how to do this, it would be much appreciative. I am very new to access.

Thanks so much... buh bye.
 
I'd use a hidden form to startup which on it's Open event (other then the usual setup stuff I perform) checks to see if a table called tblExpiry existed. If not it would create the table with one field with one record - that record being a date/time set the the system time at the time of creation.

If the table, however is created then the user has obviously used or been using the database beforehand. Thus I could use the DateDiff() function to review the date in the table with the system date and, if the expiry has passed, display a message box detailing this and then quit the database.
 
I agree with Mile, I have done something similar that opens a spash screen at startup, and the forms "On Close" event runs code that will either open the main switchboard form or sends a message box to register the product and closes the application.

You have to take mile's advice and first have the splash screens "on open" event run code to 1st check for the installation date in a specific table, if it does not exist the code places the current date in the tabe. Each time the program opens the code evaluates the system date to that date and allows the main menu to either open if the timeframe is less then 30 days or closes the application if the timeframe is beyond thirty days. You also need to include an evaluation in the code to check for a vaild registration number and provide a way for the end user to enter the registration number (through a from, etc.). You can use either if, then, else statement or Select Case statements to do the checking on the spash screens "on Close" event.

I would also recommend either packaging the program and deploying in MS access runtime or at least unchecking the "Display Database Window" box under the tools/startup menu options. This would prevent someone who didn't know much from tampering with your application.


Good Luck !

Chris
 
Hey, can you guys help me write the codes and forms. I am very new to access and don't know how. If you can, thanks.
 
Here's an example for you in Access 2000, if you need it converted let me know.
 

Attachments

Hello Hayley,

Your file doesn't work or I can't figure it out. But right off the bat, it displays the message when open. I can't change the date on it so the date on it. Can you show me how. Thanks. I had also converted it to Access 2002. So far it doesn't work.
 
The first sample works ok here, try this one instead, this should work fine.
 

Attachments

Last edited:
Great Code Sharing !! Thanks for sharing .... but still some bugs there... because user may set it back to the day begin use of the program while the date is going to expire then it work without any error... that's mean i could keep using the expire restriction program by changing the date while close to end of the month... any solution?
 
Great Code Sharing !! Thanks for sharing .... but still some bugs there... because user may set it back to the day begin use of the program while the date is going to expire then it work without any error... that's mean i could keep using the expire restriction program by changing the date while close to end of the month... any solution?

1. set the table's property to HIDDEN so it isn't out in the open.

2. Name it something totally different than what it is being used for so it isn't easily seen as what it does.

3. Instead of storing the date, encrypt the date with your own algorithm so they wouldn't be able to easily figure out how to change it.


Just some suggestions.
 
Nice suggestion Larson~~~ how bout some of the tricky user they always change the windows date?

For an example, When the first time user open the file the date had set 01-Oct-07 then the expired date will be 30-Oct-07... The database won't work if the user changing the date before or after the expired date period~~ how bout they change it before the expire date to the begining date of the first time date set of the program? exp, on 28-Oct-07 the tricky user change the windows date to 01-Oct-07 again... so the program won't expire forever while the user keep changing the date every end of the month.

Any Idea how to fix it someone?
 
How about that after the expiry date the Database deletes itself ....
No idea how to do this (probably a macro of some kind )

although the clever user could get round this - but only if they knew that the D/base would delete itself first
otherwise it would be too late ??

just thinking out loud

g
 
Or 'Rename' a key table or form on date expired??? (Joining Gary's verbal thinking process)
 
For an example, When the first time user open the file the date had set 01-Oct-07 then the expired date will be 30-Oct-07... The database won't work if the user changing the date before or after the expired date period~~ how bout they change it before the expire date to the begining date of the first time date set of the program? exp, on 28-Oct-07 the tricky user change the windows date to 01-Oct-07 again... so the program won't expire forever while the user keep changing the date every end of the month.
This is not really a valid issue because how many people do you know who will set their clocks back (and LEAVE THEM set back just to use a program)? It would quickly honk up lots of other stuff on their system.

But, as mentioned you could have it delete some integral part of the system upon reaching that date. And, to offset the chance that they would set back their clock to just start the database and then reset their clock after opening it up, you could have a hidden form open that uses the TIMER to check every so often to make sure that the date/time hasn't been exceeded.
 

Users who are viewing this thread

Back
Top Bottom