Create an ACCESS expiration date

laabidou Posted messages 2 Status Membre -  
 mprog67 -
Hello,

Hi;
I found a function that allows you to create an expiration date for an application:
If Date >= DateSerial(2003, 12, 31) Then
MsgBox "The application expiration date has passed", vbExclamation
DoCmd.Quit
End If

But if I change the system date, the application can run. I need your help to modify this code so that even if I change the date after executing the code
(the first execution), the application does not start. I tried using a boolean variable but it didn't work.

Configuration: Windows XP / Firefox 3.6.23

4 réponses

mprog67
 
Allow me to offer you my assistance.
For example, I created a timer and set the application's expiration to the number of hours elapsed.
2
laabidou Posted messages 2 Status Membre 1
 
Hi;
my code runs perfectly, but if I change the system date the program executes, and I want the program to refuse to run once the expiration date has passed even if I change the system date (date < expiration date)
thank you and see you soon;
1
castours Posted messages 2955 Registration date   Status Membre Last intervention   217
 
Hello
I think the given example is based on If Date.
Date is the system date.
Instead, you should enter the name of the expiration date field.
If your field is called DateExpir, you will need to enter If DateExpir.
Be careful with the American and French date formats.
0
Jean_Jacques Posted messages 1045 Registration date   Status Membre Last intervention   112
 
laabidou,

I haven't delved into the subject, but I can see the Now() function playing a role.
It returns the system date and should contribute to the solution sought.

Regards
--
Science only finds what has existed forever.
REEVES Hubert.
0