if(DateTime.Parse(DtpCCValidUpto.text)<Now()) Then~~Bonnie
>if(CDate.Parse(DtpCCValidUpto.text)<Now()) Then >>instead of the following wrong line?
>if(CDate(DtpCCValidUpto.text)<Now()) Then > MessageBox.Show ("Invalid date.") > DtpCCValidUpto.Focus() > Return >endif >