D
deko
This code does not compile - the error rec'd says "Next without For"
For Each olmi In olfsm.Items
rstS.MoveFirst
Do Until rstS.EOF
If Not IsNull(rst!strS) Then 'I want to check each item in
recordset that is not null
If (InStr(olmi.To, rst!srtS)) > 0 Then
rst.AddNew
rst!DateSent = olmi.SentOn
rst!Subject = olmi.Subject
rst!Recipient = olmi.To
rst.Update
End If
End If
rstS.MoveNext
Next
where am I going wrong? Is it possible to nest a Do Until inside a For
loop?
For Each olmi In olfsm.Items
rstS.MoveFirst
Do Until rstS.EOF
If Not IsNull(rst!strS) Then 'I want to check each item in
recordset that is not null
If (InStr(olmi.To, rst!srtS)) > 0 Then
rst.AddNew
rst!DateSent = olmi.SentOn
rst!Subject = olmi.Subject
rst!Recipient = olmi.To
rst.Update
End If
End If
rstS.MoveNext
Next
where am I going wrong? Is it possible to nest a Do Until inside a For
loop?