RE: I didn't think of this

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance




I think I have a different solution. I'll post back with results.

-PR

"PaleRider" wrote:

Hi again,

I have code that prevents the use of a form after a certain amount of days.
What I didn't consider is someone just changing the date on the computer.
Now, I have to figure out how to handle that otherwise it's a mute point.
The code I have in place so far has flaws that can be exploited. Is there a
way to allow someone limited use of database for a certain time frame, then
disable it after that?

Here's the code I have so far which allows use for 14 days, but as mentioned
before it can be exploited by just changing the system date:

Private Sub Form_Open(Cancel As Integer)
Dim myDate As Date
myDate = #6/2/2009#

If DateDiff("d", myDate, Date) >= 14 Then
MsgBox "Your 7 day evaluation for this database has expired."
Cancel = True
End If

End Sub

-PR
.



Relevant Pages

  • I didnt think of this
    ... I have code that prevents the use of a form after a certain amount of days. ... Private Sub Form_Open ... Dim myDate As Date ... MsgBox "Your 7 day evaluation for this database has expired." ...
    (microsoft.public.access.formscoding)
  • RE: I didnt think of this
    ... defined database properties to control it. ... When the user first opens the database, ... Private Sub Form_Open ... Dim myDate As Date ...
    (microsoft.public.access.formscoding)
  • Re: "Overflow Error" - need help please.
    ... Okay, so the Overflow Error happens in the form, even when it has NO code. ... Then compact the database: ... INSERT INTO tblContacts (ctEnteredDate, ctPeopleSoftID, ctLastName1, ... Private Sub Form_Current ...
    (microsoft.public.access.modulesdaovba)
  • RE: Error 2455 on close of db
    ... occurs when you exit this form in this way. ... I do have a split db with a hidden form that opens when the database does to ... Private Sub Form_Unload ...
    (microsoft.public.access.formscoding)
  • RE: Error 2455 on close of db
    ... occurs when you exit this form in this way. ... I do have a split db with a hidden form that opens when the database does to ... Private Sub Form_Unload ...
    (microsoft.public.access.formscoding)