求解vb问题
P_rstStyle.Fields(TITEM1+5)=Format(ReadWd,"00.0")+Format(ReadTd,"00.0")+Format(ReadPa...
P_rstStyle.Fields(TITEM1 + 5) = Format(ReadWd, "00.0") + Format(ReadTd, "00.0") + Format(ReadPair, "000.0")
每次到这部就出现“字段长度”什么之类的故障。求解!
----------- Save Original Datas ---------------
wDate = Format(Now, "yyyy/mm/dd") ' CDate(CStr(year) + "/" + CStr(month) + "/" + CStr(day))
'If (Not P_select1) And (Not P_select2) Then
strTmbh = frmRated.Text8(2).Text
Set P_dbsStyle = OpenDatabase(Cpath$ + "ydwData.mdb", False, False)
SQLstring = "select * from " + Format(Now, "yymmdd")
Set P_rstStyle = P_dbsStyle.OpenRecordset(SQLstring, dbOpenDynaset)
P_rstStyle.Fields(TITEM1) = strTmbh
P_rstStyle.Fields(TITEM1 + 1) = UCase(P_strReportNumberDisp)
P_rstStyle.Fields(TITEM1 + 2) = wDate
P_rstStyle.Fields(TITEM1 + 3) = Time
pBad1 = PselCNUA '各种试验标志1-icea,2-iceb,3-astm
P_rstStyle.Fields(TITEM1 + 4) = CStr(pBad1) 'Oprater
P_rstStyle.Fields(TITEM1 + 5) = Format(ReadWd, "00.0") + Format(ReadTd, "00.0") + Format(ReadPair, "000.0")
P_rstStyle.Update
P_rstStyle.Close
P_dbsStyle.Close
DispOkPercent
End Sub 展开
每次到这部就出现“字段长度”什么之类的故障。求解!
----------- Save Original Datas ---------------
wDate = Format(Now, "yyyy/mm/dd") ' CDate(CStr(year) + "/" + CStr(month) + "/" + CStr(day))
'If (Not P_select1) And (Not P_select2) Then
strTmbh = frmRated.Text8(2).Text
Set P_dbsStyle = OpenDatabase(Cpath$ + "ydwData.mdb", False, False)
SQLstring = "select * from " + Format(Now, "yymmdd")
Set P_rstStyle = P_dbsStyle.OpenRecordset(SQLstring, dbOpenDynaset)
P_rstStyle.Fields(TITEM1) = strTmbh
P_rstStyle.Fields(TITEM1 + 1) = UCase(P_strReportNumberDisp)
P_rstStyle.Fields(TITEM1 + 2) = wDate
P_rstStyle.Fields(TITEM1 + 3) = Time
pBad1 = PselCNUA '各种试验标志1-icea,2-iceb,3-astm
P_rstStyle.Fields(TITEM1 + 4) = CStr(pBad1) 'Oprater
P_rstStyle.Fields(TITEM1 + 5) = Format(ReadWd, "00.0") + Format(ReadTd, "00.0") + Format(ReadPair, "000.0")
P_rstStyle.Update
P_rstStyle.Close
P_dbsStyle.Close
DispOkPercent
End Sub 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询