我在 vb6 中开发了一个在 Windows XP 中正常运行的应用程序,但是当我尝试在 Windows 7 上运行它时,它显示运行时错误 380,无效属性。这是导致错误的代码:
Private Sub getData()
txtID.Text = rs!emp_id & ""
txtDept.Text = rs!dept_name & ""
txtDesig.Text = rs!desig_name & ""
txtName.Text = rs!emp_name & ""
txtPFNo.Text = rs!PF_ACC_NO & ""
cdDate.Text = Format(rs!PF_DATE, "dd/mm/yyyy") '(This line produces the error)
txtOwnSubs.Text = rs!SubsO & ""
txtUCont.Text = rs!ContU & ""
txtOptional.Text = rs!Optional & ""
txtLoanSanc.Text = rs!LoanSanc & ""
txtLoanRec.Text = rs!LoanRecovery & ""
txtInt.Text = rs!RateOfInt & ""
txtOSubs.Text = rs!OpeningO & ""
txtOcont.Text = rs!OpeningU & ""
txtCSubs.Text = rs!ClosingO & ""
txtCCont.Text = rs!ClosingU & ""
txtIntDurOwn.Text = rs!InterestO & ""
txtIntDurCont.Text = rs!InterestU & ""
txtIntUptoOwn.Text = rs!CInterestO & ""
txtIntUptoCont.Text = rs!CInterestU & ""
txtTotIntO.Text = rs!CInterestO & ""
txtTotIntC.Text = rs!CInterestU & ""
txtWithdrawn.Text = rs!withdrawn & ""
If rs!Type & "" = "N" Then
cboType.ListIndex = 0
Else
cboType.ListIndex = 1
End If
End Sub
注意:我从那里创建了 DateCheck.ocx,我正在使用 cdDate。