Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Location
    South Africa
    Posts
    178

    Unhappy Unanswered: insert statement syntax error 3134

    hi all

    I'm hoping my problem seems simple to you, cos I'm really struggling.
    I keep getting the syntax error 3134 on my Insert statement:

    DoCmd.RunSQL ("INSERT INTO Input(EmpNo,Date,In,Measure,JobNo) VALUES ('" & Form_Input.Combo0.Value & "','" & Me.DateBox.Value & "','" & Me.In1.Value & "','" & Me.Meas1.Caption & "','1');")

    please help

    thanks in advance
    ActionAnt

  2. #2
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Re: insert statement syntax error 3134

    Originally posted by actionant
    hi all

    I'm hoping my problem seems simple to you, cos I'm really struggling.
    I keep getting the syntax error 3134 on my Insert statement:

    DoCmd.RunSQL ("INSERT INTO Input(EmpNo,Date,In,Measure,JobNo) VALUES ('" & Form_Input.Combo0.Value & "','" & Me.DateBox.Value & "','" & Me.In1.Value & "','" & Me.Meas1.Caption & "','1');")

    please help

    thanks in advance
    ActionAnt
    Couple of things ... "Date" is a SQL reserved word "In" is also... Dates as string literals need to be surrounded by "#" signs. Your SQL statement should be more like:

    DoCmd.RunSQL ("INSERT INTO Input(EmpNo,[Date],[In],Measure,JobNo) VALUES ('" & Form_Input.Combo0.Value & "',#" & Me.DateBox.Value & "#,'" & Me.In1.Value & "','" & Me.Meas1.Caption & "','1');")

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •