Microsoft Access Runtime Error 3134
Syntax Error in INSERT INTO Statement If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register run time error 3134 insert into statement before you can post: click the register link above to proceed. To runtime error 3061 start viewing messages, select the forum that you want to visit from the selection below. Results 1 to 4 of 4 Thread: [RESOLVED] Runtime Error 3134 - Syntax Error in INSERT INTO Statement Tweet Thread Tools Show Printable Version Subscribe to this Thread… Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode May 13th, 2011,10:14 AM #1 Wiggz View Profile View Forum Posts Thread Starter New Member Join Date May 2011 Posts 12 [RESOLVED] Runtime Error 3134 - Syntax Error in INSERT INTO Statement Hello all, First time poster here. I have worked with VB6 in the past but am a little rusty. My employer gave me a database (already partially constructed) to work on in my free time. I am using MS Access 2007. My current issue is with the following code which executes on a button click on an unbound form: Code: Private Sub Command44_Click() Dim query1 As String query1 = "INSERT INTO User (Last Name, First Name, User name, Location, " & _ "Staff ID, Email1, Email2, Nickname, Address, City, State, Zip, Home Phone, " & _ "Cell Phone, Notes) VALUES ('" & Me!LastName.Value & "', '" & Me!FirstName.Value _ & "', '" & Me!Username.Value & "', '" & Me!Location.Value & "', '" & Me!StaffID.Value _ & "', '" & Me!Email1.Value & "', '" & Me!Email2.Value & "', '" & Me!Nickname.Value _ & "', '" & Me!Address.Value & "', '" & Me!City.Value & "', '" & Me!State.Value _ & "', " & Me!Zip.Value & ", " & Me!HomePhone.Value & ", " & Me!CellPhone.Value _ & ", '" & Me!Notes.Value & "');" Debug.Print query1 DoCmd.RunSQL query1 End Sub The results of the Debug.Print statement are: Code: INSERT INTO User (Last Name, First Name, User name, Location, Staff ID, Email1, Email2, Nickname, Address, City, State, Zip, H
soon) Ruby (coming soon) Getting Started Code Samples Resources Patterns and Practices App Registration Tool Events Podcasts Training API Sandbox Videos Documentation Office Add-ins Office Add-in Availability Office Add-ins Changelog Microsoft Graph API Office 365 Connectors Office 365 REST APIs SharePoint Add-ins Office UI Fabric Submit to the Office Store All Documentation https://www.yammer.com/ http://feeds.feedburner.com/office/fmNx Ask a question Quick access Forums home Browse forums users FAQ Search related threads Remove From My Forums Answered by: Run-time error 3134 http://www.vbforums.com/showthread.php?649836-RESOLVED-Runtime-Error-3134-Syntax-Error-in-INSERT-INTO-Statement - Syntax error in Insert Into statement Microsoft Office for Developers > Access for Developers Question 0 Sign in to vote Dim StrSQL As String StrSQL = "" StrSQL = "INSERT INTO tbl_records FacilityLocation VALUES 'Napa' " Debug.Print StrSQL DoCmd.RunSQL (StrSQL) I cannot for the life of me figure out why this https://social.msdn.microsoft.com/Forums/office/en-US/05908f32-2ba3-40d8-ab95-e7e36e9291f2/runtime-error-3134-syntax-error-in-insert-into-statement?forum=accessdev is giving me this error. The field name is fine and the table name is correct. What is going on here? Tuesday, November 09, 2010 12:54 AM Reply | Quote Answers 0 Sign in to vote Chrsitina Glabas wrote: Dim StrSQL As String StrSQL = "" StrSQL = "INSERT INTO tbl_records FacilityLocation VALUES 'Napa' " StrSQL = "INSERT INTO tbl_records( FacilityLocation) VALUES( 'Napa' ) " Mind the parentheses. Peter Doering [MVP Access] Marked as answer by VanderghastModerator Friday, November 12, 2010 9:45 AM Tuesday, November 09, 2010 1:36 AM Reply | Quote All replies 0 Sign in to vote Chrsitina Glabas wrote: Dim StrSQL As String StrSQL = "" StrSQL = "INSERT INTO tbl_records FacilityLocation VALUES 'Napa' " StrSQL = "INSERT INTO tbl_records( FacilityLocation) VALUES( 'Napa' ) " Mind the parentheses. Peter Doering [MVP Access] Marked as answer by VanderghastModerator Friday, November 12, 2010 9:45 AM Tuesday, November 09, 2010 1:36 AM Reply | Quote 0 Sign in to vote Peter is correct. One w
Forums Microsoft Access Run-Time Error 3134 - Syntax Error in Insert Into Statement Results 1 to 5 of 5 Run-Time Error 3134 - Syntax Error in Insert Into StatementThis is a discussion on Run-Time Error 3134 - Syntax Error in Insert Into Statement within the Microsoft Access http://www.mrexcel.com/forum/microsoft-access/753645-run-time-error-3134-syntax-error-insert-into-statement.html forums, part of the Question Forums category; Hi - I have an Insert Into Statement in my VBA code and I keep getting a run-time error 3134. ... LinkBack LinkBack URL About LinkBacks Bookmark & Share Digg this Thread!Add Thread to del.icio.usBookmark in TechnoratiTweet this thread Thread Tools Show Printable Version Display Linear Mode Switch to Hybrid Mode Switch to Threaded Mode Jan 28th, 2014,02:09 PM #1 davidb88 Board Regular Join Date Sep 2013 Posts 75 Run-Time Error 3134 - Syntax time error Error in Insert Into Statement Hi - I have an Insert Into Statement in my VBA code and I keep getting a run-time error 3134. I know there are a number of posts about this type of problem and I have tried all of the solutions I have found but nothing seems to work for this particular string. If someone sees the issue, can you please point it out? Thanks. Code: strSQL = "INSERT INTO tblPDcalc ([Month End], [Loan Type], [FICO Band], [r1PD], time error 3134 [r2PD], [r3PD], [r4PD], [r5PD], " _ & "SELECT (#" & modeldate & "#, '1st Mtg', '1', " _ & " " & r1PD & ", " & r2PD & ", " & r3PD & ", " & r4PD & ", " & r5PD & ");" DoCmd.RunSQL (strSQL) Share Share this post on Digg Del.icio.us Technorati Twitter Reply With Quote Jan 28th, 2014,02:35 PM #2 mole999 Moderator Join Date Oct 2004 Location UK Posts 6,820 Re: Run-Time Error 3134 - Syntax Error in Insert Into Statement double speech marks on beginning of line three look suspicious to me Share Share this post on Digg Del.icio.us Technorati Twitter Yes I know there are better ways to do it. I just wish I knew them. - 2003, 2007, 2010, 2013 & 2016 I wear my ignorance openly, excel is not my chosen career, its a means to an endsPosting Guidelines Want to post well laid out questions and answers Translate Excel Versions Code: [CODE ]Put Your Code[/ CODE] Settings > General Settings (on the left) scroll to the bottom, > Miscellaneous Options > Use ENHANCEDX-Posting Guidelines Rule 13 Reply With Quote Jan 28th, 2014,02:39 PM #3 Norie Board Regular Join Date Apr 2004 Location Stirling Posts 70,059 Re: Run-Time Error 3134 - Syntax Error in Insert Into Statement Why are you using SELECT when the values you are inserting aren't coming from a table/query. This is the syntax for inserting values: INSERT INTO table_name (column1,column2,column3,...) VALUES (value1,value2,value3,...); Share Share th