Dim s1,s2,s3 As String s1 = e.Form.Controls("日期").Value s2 = e.Form.Controls("班组").Value s3 = e.Form.Controls("姓名").Value If s3 <> "" And e.Form.Controls("出勤工时").Value <> "" Then For Each dr As DataRow In DataTables("表A").Select("[日期] = #" & s1 & "# And [班组] = '" & s2 & "' And [姓名] In('" & s3.Replace(",","','") & "')") dr("出勤工时") = e.Form.Controls("出勤工时").Value Next End If