Hi,
So I'm trying to update different records, each to different value, each using a different criteria, but I want to do it all in one code. I tried something like this from a hidden form base on the table to be updated:
Queries on run for the first record, but not the subsequent records. Tried putting in a gotorecord ,,acnext before the "loop", but still doesn't work. Does anyone know why?
Niroth
So I'm trying to update different records, each to different value, each using a different criteria, but I want to do it all in one code. I tried something like this from a hidden form base on the table to be updated:
Code:
Set myrcdst = Me.Recordset
With myrcdst
Do Until .EOF
DoCmd.RunSQL "DELETE * FROM " & Me.tblName _
& " WHERE (((" & tblName & ".logTime)<#" & me.logTime & "#));"
DoCmd.RunSQL "UPDATE dataTransferLog SET dataTransferLog.logTime = Now()" _
& " WHERE (((dataTransferLog.tblName)= '" & Me.tblName & "'));"
.MoveNext
Loop
End With
Queries on run for the first record, but not the subsequent records. Tried putting in a gotorecord ,,acnext before the "loop", but still doesn't work. Does anyone know why?
Niroth