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编辑过]
|