它給我一個運行時錯誤3134語法錯誤插入到語句中,同時點擊該控件。顯示運行時錯誤3134在訪問時從
Private Sub CmdAddNew_Click()
'add data to table
CurrentDb.Execute "INSERT INTO tblemployee(,firstname,lastname,Address,city)" & _
"VALUES('" & Me.txtfirstname & "','" & Me.txtlastname & "','" & Me.txtaddress & "','" & Me.txtcity & "')"
您有一個SQL注入問題。如果'txtlastname'是「O'Hara」會發生什麼? –