dim i as integer dim t as string = .Controls("TextBox2").value dim kz as string = "TextBox14,ComboBox4,TextBox2,TextBox6,TextBox10,TextBox3,ComboBox5,TextBox25,TextBox16,TextBox22" dim sql as string = "Update [出入库] (日期 =,类型 =,单号 =,仓库名称 =,卸货码头 =,操作者 =,货主代号 =,货主名称 =,实入量 =,实入件数 =) where 单号 = '" & t & " '" sql = sql & "set ( '@$0','@$1','@$2','@$3','@$4','@$5','@$6','@$7','@$8','@$9')" For Each k as string In kz.split("=") sql = sql.Replace("@$" & i,.Controls(k).Value) i += 1 Next cmd.CommandText = sql cmd.ExecuteNonQuery() 以上想通过批量控件的值进行修改外部表[出入库]符合条件的语名,不知错在哪?请各位指点!多谢帮忙!!