I need some help here. It is about format date on IsDate Function. It seems, that i can't get it right. I hope you can assist me on this. This is what i am trying to achieve. User Input a date in MskEffective Date and automatically Isdate function generate an Expiry Date in MskExpiry. My Problem is each time i enter an effective date it prompt me an Error stated Invalid Property Value on <<FormName.mskExpiry = YearDate - 1>>. Below are my coding. I believe it is my coding problem. I have solved a couple of Error on Date but not this time. I am appreciate with anyone help. Thank you in advance.

VB Code:
  1. Public Sub Validate(FormName As Form)
  2.  
  3. IntervalY = "yyyy"
  4. If IsDate(FormName.mskEffective) = False Then
  5. MsgBox "Date Wrong Format.Please check Date", vbCritical, "Date Format Incorrect"
  6. FormName.mskEffective.SetFocus
  7. Exit Sub
  8. End If
  9. FirstDate = FormName.mskEffective
  10.      'FirstDate = Format(FirstDate, "dd-mm-yyyy")
  11. number = 1
  12. YearDate = DateAdd(IntervalY, number, FirstDate)
  13.      'YearDate = Format(FirstDate, "dd-mm-yyyy")
  14.      'FormName.mskExpiry = Format(FormName.mskExpiry, "dd-mm-yyyy")
  15. FormName.mskExpiry = YearDate - 1 'ExpiryDate Must Minus One Day
  16. End Sub
As you can see there are couple of Remarks which i tested out but all fail.