添加到语句中,现在不起作用

时间:2018-09-17 21:08:59

标签: ms-access access-vba ms-access-2013

我正在尝试查找SQL语句中的错误位置,但似乎无法找到它。 VBA告诉我“编译错误:未找到Mehthod或数据成员”,并突出显示[RotationalServings7]= '" & Me.Text499 & "',但一遍又一遍地看后,对我来说似乎是正确的。同样,debug.print mysql2并没有给我丝毫显示它正在执行的操作。

旁注;直到我将所有9和10项都添加完为止,它工作得很好。浏览表格,所有信息都是正确的,与要更新的表相同。

    mysql2 = "UPDATE Thaw_Tags_FTI SET [RotationalItem1]= '" & Me.Combo445.Column(1) & "',[RotationalMeat1]= '" & Me.Text449 & "',[RotationalSS1]= '" & Me.Text452 & "',[RotationalServings1]= '" & Me.Text447 & "',[RotationalItem2]= '" & Me.Combo455.Column(1) & "'," _
& "[RotationalMeat2]= '" & Me.Text459 & "',[RotationalSS2]= '" & Me.Text461 & "',[RotationalServings2]= '" & Me.Text457 & "',[RotationalItem3]= '" & Me.Combo463.Column(1) & "',[RotationalMeat3]= '" & Me.Text467 & "',[RotationalSS3]= '" & Me.Text469 & "'," _
& "[RotationalServings3]= '" & Me.Text465 & "',[RotationalItem4]= '" & Me.Combo471.Column(1) & "',[RotationalMeat4]= '" & Me.Text475 & "',[RotationalSS4]= '" & Me.Text477 & "',[RotationalServings4]= '" & Me.Text473 & "',[RotationalItem5]= '" & Me.Combo479.Column(1) & "'," _
& "[RotationalMeat5]= '" & Me.Text483 & "',[RotationalSS5]= '" & Me.Text486 & "',[RotationalServings5]= '" & Me.Text481 & "',[RotationalItem6]= '" & Me.Combo489.Column(1) & "',[RotationalMeat6]= '" & Me.Text493 & "',[RotationalSS6]= '" & Me.Text495 & "',[RotationalServings6]= '" & Me.Text491 & "'," _
& "[RotationalItem7]= '" & Me.Combo497.Column(1) & "',[RotationalMeat7]= '" & Me.Text501 & "',[RotationalSS7]= '" & Me.Text503 & "',[RotationalServings7]= '" & Me.Text499 & "',[RotationalItem8]= '" & Me.Combo505.Column(1) & "',[RotationalMeat8]= '" & Me.Text509 & "',[RotationalSS8]= '" & Me.Text511 & "',[RotationalServings8]= '" & Me.Text507 & "'," _
& "[RotationalItem9]= '" & Me.Combo778.Column(1) & "',[RotationalMeat9]= '" & Me.Text789 & "',[RotationalSS9]= '" & Me.Text784 & "',[RotationalServings9]= '" & Me.Text780 & "',[RotationalItem10]= '" & Me.Combo787.Column(1) & "',[RotationalMeat10]= '" & Me.Text791 & "',[RotationalSS10]= '" & Me.Text793 & "',[RotationalServings10]= '" & Me.Text789 & "'" _
& "WHERE [ID]=Forms!Thaw_Report_FTI!Combo160"

0 个答案:

没有答案