J
John Phelan
What do you think of the following code for limiting demos
to two months? Will it work?
'On the opening form or switchboard I hard code the
following:
Private Sub Form_Activate()
Dim TodayDate, CutoffDate As Date
CutoffDate = DateAdd("m", 2, Now)
TodayDate = Date
' Program will not run after 2 months ("m", 2,Now) from
installation date (TodayDate).
If CutoffDate > TodayDate Then
MsgBox("The Trial Period has Expired
DoCmd.Quit
End If
End Sub
'I put the same code into the Form_Open() and/or Form_Load
() .
John
to two months? Will it work?
'On the opening form or switchboard I hard code the
following:
Private Sub Form_Activate()
Dim TodayDate, CutoffDate As Date
CutoffDate = DateAdd("m", 2, Now)
TodayDate = Date
' Program will not run after 2 months ("m", 2,Now) from
installation date (TodayDate).
If CutoffDate > TodayDate Then
MsgBox("The Trial Period has Expired
DoCmd.Quit
End If
End Sub
'I put the same code into the Form_Open() and/or Form_Load
() .
John