I created a very simple code that checks the current date, and if the the current date is greater or less than the pre programmes date open a msg box.
I know it works, albeit in reverse of how I thought the < or > would, but is there a better way to do this. I know it's not the most secure code ever written but it will do the job that I need it to. I randomly came up with this but I am more than open to better options.
Code:
Private Sub Command1_Click()
If Date < 1 / 20 / 2010 Then
Dim ButtonClicked
ButtonClicked = MsgBox("Sorry, your current license has expired. Please contact administrator to renew", vbOKOnly)
Else
DoCmd.OpenForm ("frmMain")
End If
I know it works, albeit in reverse of how I thought the < or > would, but is there a better way to do this. I know it's not the most secure code ever written but it will do the job that I need it to. I randomly came up with this but I am more than open to better options.