anujkmehrotra
Programmer
- Jan 21, 2012
- 17
I'm getting an error in the following line:
Me.LicLogDt = Date
I want to update LicLogDt(bound date field) to get current date of system on form load/open, but error says "Can't assign a value". It is working on Form Close but not on Open/Load. Please guide to do so.
----------
Code:
----------
Private Sub Form_Load()
If Date < Me.LicLogDt Then
MsgBox ("System date is less than last login date. Please set your system date to current first and login again."), vbInformation, "Error"
DoCmd.Close
Else
Me.LicLogDt = Date
If Me.LicLogDt >= Me.LicExpDt Then
MsgBox ("Trail period has been expired. Please purchase full version of Auto Evolution today."), vbCritical, "Demo Expired"
CurrentDb.Execute "UPDATE tblLicence SET strCheckLicence = 'Validation' WHERE idLicence = 1"
End If
End If
End Sub
---------
Thanks & Regards,
Anuj
Me.LicLogDt = Date
I want to update LicLogDt(bound date field) to get current date of system on form load/open, but error says "Can't assign a value". It is working on Form Close but not on Open/Load. Please guide to do so.
----------
Code:
----------
Private Sub Form_Load()
If Date < Me.LicLogDt Then
MsgBox ("System date is less than last login date. Please set your system date to current first and login again."), vbInformation, "Error"
DoCmd.Close
Else
Me.LicLogDt = Date
If Me.LicLogDt >= Me.LicExpDt Then
MsgBox ("Trail period has been expired. Please purchase full version of Auto Evolution today."), vbCritical, "Demo Expired"
CurrentDb.Execute "UPDATE tblLicence SET strCheckLicence = 'Validation' WHERE idLicence = 1"
End If
End If
End Sub
---------
Thanks & Regards,
Anuj