strsql = "SELECT s.source, max(updated_source_version) + .1 as new_version from tbl_sourcelog AS s INNER JOIN tbl_import AS i on i.[source] = s.[source] " & _
" where i.validated is null and s.[current] = ""N"" group by s.source;"
OpenAccessRecordset (strsql)
If Not rsDB.EOF Then
strsql = "UPDATE tbl_sourceLog AS s INNER JOIN tbl_import AS i ON s.[source] = i.[Source] " & _
" SET updated_source_version = '" & rsDB.Fields(1).Value & _
"' WHERE i.validated Is Null AND s.[current]=""Y"" and s.[source] = """ & rsDB.Fields(0).Value & """;"
ExecuteCmd (strsql)
End If
|