我有一个数据库(CodeStorage),其中有一个存储多个代码的表,我创建了用于插入数据、搜索和删除的表单。我正在编写插入代码,但我不断收到错误消息:
Run-time error '424':
Object Required
它总是突出显示代码
CodeStorage.Execute = "INSERT INTO KWTable(KW, Source, Code) " & _
" VALUES(" & Me.text_key & ",'" & Me.txt_code & "','" & _
Me.combo_source & "')"
完整的代码是,
Private Sub cmdAdd_Click()
'add data to table
CodeStorage.Execute = "INSERT INTO KWTable(KW, Source, Code) " & _
" VALUES(" & Me.text_key & ",'" & Me.txt_code & "','" & _
Me.combo_source & "')"
'refresh data in list on form
TableSub.Form.Requery
End Sub
有任何想法吗?