Office中国论坛/Access中国论坛

标题: [讨论]记录集错误 [打印本页]

作者: sunzzw    时间: 2007-7-7 00:29
标题: [讨论]记录集错误
Private Sub Commandadd_Click()
Dim STemp As String
Dim Rs As ADODB.Recordset
Set Rs = New ADODB.Recordset
STemp = "Select * From BIN"
Rs.Open STemp, CurrentProject.Connection, adOpenKeyset, adLockOptimistic
    STemp = "INSERT INTO BIN "
    STemp = STemp & "( gonumber,buildup,bin,bindate,line,"
    STemp = STemp & "qty,spec,ply,operator,explain)"
    STemp = STemp & "VALUES ('" & Me![SCAND] & "','" & Me![combo_buildup] & "',"
    STemp = STemp & "'" & Me![bin] & "','" & Me![bindate] & "',"
    STemp = STemp & "'" & Me![line] & "','" & Me![rmy] & "',"
    STemp = STemp & "'" & Me![spec] & "','" & Me![ply] & "',"
    Temp = STemp & "'" & Me![combo_operator] & "','" & Me![lab_communication] & "')"
    DoCmd.RunSQL STemp
    Set Rs = Nothing
End Sub
运行这段代码时,会提示"编译错误:用户定义类型未定义"

请问有谁知道这样的错误怎样解决?

[此贴子已经被作者于2007-7-7 10:22:38编辑过]


作者: 一点通    时间: 2007-7-7 19:53
语句停留在哪?
作者: andymark    时间: 2007-7-7 20:03
文本、数字、日期各类型书写是有区别的


作者: sunzzw    时间: 2007-7-7 21:29
Dim Rs As ADODB.Recordset 运行时语句停留在这一句

我在好多程序里都看到过上面的广开语句,

我这样申明怎么就不出错呢

作者: andymark    时间: 2007-7-7 21:54
引用ADO




欢迎光临 Office中国论坛/Access中国论坛 (http://www.office-cn.net/) Powered by Discuz! X3.3