none
3144 Syntax Error RRS feed

  • Question

  • Can anyone see the syntax error in this code?  I have been trying for over 30 min reading and testing and I just do not see it.  Here is the code:

    DoCmd.RunSQL "UPDATE tblMfcMain " & _
                 " Leasing_Prog_1 = '" & Forms!frmMfcMthUpd.Leasing_Prog_1 & "' ," & _
                 " Leasing_Prog_1_Dollar = " & Forms!frmMfcMthUpd.Leasing_Prog_1_Dollar & "," & _
                 " Leasing_Prog_2 = '" & Forms!frmMfcMthUpd.Leasing_Prog_2 & "' ," & _
                 " Leasing_Prog_2_Dollar = " & Forms!frmMfcMthUpd.Leasing_Prog_2_Dollar & "," & _
                 " Leasing_Prog_3 = '" & Forms!frmMfcMthUpd.Leasing_Prog_3 & "' ," & _
                 " Leasing_Prog_3_Dollar = " & Forms!frmMfcMthUpd.Leasing_Prog_3_Dollar & "," & _
                 " Leasing_Prog_4 = '" & Forms!frmMfcMthUpd.Leasing_Prog_4 & "' ," & _
                 " Leasing_Prog_4_Dollar = " & Forms!frmMfcMthUpd.Leasing_Prog_4_Dollar & "," & _
                 " Dealer_Cash_Prog_1 = '" & Forms!frmMfcMthUpd.Dealer_Cash_Prog_1 & "' ," & _
                 " Dealer_Cash_Prog_1_Dollar = " & Forms!frmMfcMthUpd.Dealer_Cash_Prog_1_Dollar & "," & _
                 " Dealer_Cash_Prog_2 = '" & Forms!frmMfcMthUpd.Dealer_Cash_Prog_2 & "' ," & _
                 " Dealer_Cash_Prog_2_Dollar = " & Forms!frmMfcMthUpd.Dealer_Cash_Prog_2_Dollar & "," & _
                 " Dealer_Cash_Prog_3 = '" & Forms!frmMfcMthUpd.Dealer_Cash_Prog_3 & "' ," & _
                 " Dealer_Cash_Prog_3_Dollar = " & Forms!frmMfcMthUpd.Dealer_Cash_Prog_3_Dollar & "," & _
                 " Dealer_Cash_Prog_4 = '" & Forms!frmMfcMthUpd.Dealer_Cash_Prog_4 & "' ," & _
                 " Dealer_Cash_Prog_4_Dollar = " & Forms!frmMfcMthUpd.Dealer_Cash_Prog_4_Dollar & "," & _
                 " Air_Bags_Cnt = " & Forms!frmMfcMthUpd.Air_Bags_Cnt & "," & _
                 " Safety_1 = '" & Forms!frmMfcMthUpd.Safety_1 & "' ," & _
                 " Safety_2 = '" & Forms!frmMfcMthUpd.Safety_2 & "' ," & _
                 " Safety_3 = '" & Forms!frmMfcMthUpd.Safety_3 & "' " & _
                 " WHERE tblMfcMain.MakeCar=forms!frmMfcMthUpd!cboMakeDtl " & _
                 " AND   tblMfcMain.YearCar=forms!frmMfcMthUpd!cboYearCar " & _
                 " AND   tblMfcMain.Model=forms!frmMfcMthUpd!cboModel;"

        MsgBox "Record Updated 2 "

    DoCmd.RunSQL "UPDATE tblMfcMain " & _
                 " Option_1 = '" & Forms!frmMfcMthUpd.Option_1 & "' ," & _
                 " Option_2 = '" & Forms!frmMfcMthUpd.Option_2 & "' ," & _
                 " Option_3 = '" & Forms!frmMfcMthUpd.Option_3 & "' ," & _
                 " RtlPrcType = " & Forms!frmMfcMthUpd.RtlPrcType & "," & _
                 " RtlPrcDlr = " & Forms!frmMfcMthUpd.RtlPrcDlr & "," & _
                 " RtlPrcPct = " & Forms!frmMfcMthUpd.RtlPrcPct & "," & _
                 " LsePrcType = " & Forms!frmMfcMthUpd.LsePrcType & "," & _
                 " LsePrcDlr = " & Forms!frmMfcMthUpd.LsePrcDlr & "," & _
                 " LsePrcPct = " & Forms!frmMfcMthUpd.LsePrcPct & _
                 " WHERE tblMfcMain.MakeCar=forms!frmMfcMthUpd!cboMakeDtl " & _
                 " AND   tblMfcMain.YearCar=forms!frmMfcMthUpd!cboYearCar " & _
                 " AND   tblMfcMain.Model=forms!frmMfcMthUpd!cboModel;"

      Thanx in advance.

    Sunday, January 14, 2018 11:45 AM

Answers

All replies