Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

INSERT INTO

Status
Not open for further replies.

deesheeha

Programmer
Jul 28, 2006
38
IE
Hi,

Can anyone see why im getting the following error:

Run-time error '3134'
Syntax error in INSERT INTO statement.

Heres the statement thats giving me the error:

Set rs = CurrentDb.OpenRecordset("INSERT INTO callactions(callactions.Actions) VALUE ('" & ComboAction & "') ; ")


I've tried using # symbols instead of ' symbols but this didnt work
Cheers

Dee
 
A recordset requires an SQL statement that returns records and INSERT INTO statements do not do that. You may want something like
Code:
CurrentDb.Execute "INSERT INTO callactions (Actions) " & _
                  "VALUE[COLOR=red][b]S[/b][/color] ('" & ComboAction & "') ; "
 
i tried that and it spat out this error at me:

Run-tim error '3155'
ODBC--insert on a linked table 'callactions' failed.
 
Are you able to manually enter a new record into your callactions linked table?
 
There could be several reasons.

Does the target table "callactions" have primary keys and/or fields that do not allow NULLs and you are not supplying them?

Do you have write authority on the table?

Is the data type of the field "actions" really Text?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top