-》
dateTimePicker1.Value 这个数据格式不对吧??
Private Sub Form_Load()Data1.Refresh
Dim i As Integer, istr As String
Text1 = ""
For i = 0 To Data1.Recordset.Fields.Count - 1
istr = istr &FieldType(Data1.Recordset.Fields(i).Type) &","
Next
Text1 = Left(istr, Len(istr) - 1)
End Sub
Function FieldType(intType As Integer) As String
Select Case intType
Case dbBoolean
FieldType = "dbBoolean"
Case dbByte
FieldType = "dbByte"
Case dbInteger
FieldType = "dbInteger"
Case dbLong
FieldType = "dbLong"
Case dbCurrency
FieldType = "dbCurrency"
Case dbSingle
FieldType = "dbSingle"
Case dbDouble
FieldType = "dbDouble"
Case dbDate
FieldType = "dbDate"
Case dbText
FieldType = "dbText"
Case dbLongBinary
FieldType = "dbLongBinary"
Case dbMemo
FieldType = "dbMemo"
Case dbGUID
FieldType = "dbGUID"
End Select
End Function
如果你的文本框是字符型的(默认),那么repl 成绩 with val(allt(thisform.text1.value))
如果你的文本筐本来就是数值型的,那么
repl 成绩 with thisform.text1.value
如果还不对,那么,是不是你表中的成绩字段不是数值型的呀?
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)