Just thinking aloud....
Put a startup form, with a textbox in the form, which will display
asking for your "Registration Code". If they don't put in the proper
Registration Code, then your Else code would fire. I would bind the
registration code to a table containing the field.
I would use the following code as a starting point.
Private Sub cmdOK_Click()
Dim intTrialDays As Integer
Dim ysnTrial As Boolean
intTrialDays = DateDiff("d", #1/1/2006#, Date)
If intTrialDays < 30 Then ysnTrial = True
If Me.Registration.Value = "123456" Then ysnTrial = True
If ysnTrial = True Then
Me.Modal = False
DoCmd.Close acForm, Me.Name
Else
MsgBox "Your Trial has ended"
Application.Quit
End If
End Sub
Private Sub Form_Load()
Me.Modal = True
End Sub
You still need to take care of the problem so that once the Registration
Number is validated, don't show the form ever again. But I suspect that
you can take care of that in code by changing the applications Startup
Form.
Dawn Crosier
Application Specialist
Microsoft MVP
"Education Lasts a Lifetime"
This message was posted to a newsgroup. Please post replies and
questions to the group so that others can learn as well.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of tam_yehia
Sent: Thursday, March 09, 2006 8:41 AM
To: [email protected]
Subject: [ms_access] Activation Code
Hi all, is there a way to make my Access project a trial version project
that's need to be activated after a period of time. thanx all
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ms_access/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/