if Not IsNull(dupRS("ProductCode")) Or Not dupRS("ProductCode") = "" Then
.CellValue(lRow, "ProductCode") = dupRS("ProductCode")
Debug.Print "dupRS ProductCode = " & dupRS("ProductCode")
sql = "UPDATE tblOrderDetail SET [ProductCode] = " & .CellValue(lRow, "ProductCode") & " WHERE tblOrderDetail.DetailID = " & iGrid3.CellValue(lRow, "DetailID")
Debug.Print (sql)
CurrentProject.Connection.Execute sql
.DrawCell lRow, "ProductCode"
End If
|