Hi Guy's, hope you are all well, this one should be a simple fix!
I am trying to update a recordset between 2 dates with a criteria: if an email address exists, then update Send Reminder field with the email addresses
If an email address doesn't exist looping through the records then just "N/A"
Result: There is nothing being added to the Send Reminder Field
Code:Dim rs as dao,Recordset, sDate as Date,eDate as Date, em as String sDate = Me.txtFrom eDate = Me.txtDateTo Set rs = CurrentDb.OpenRecordset("Select * From tblRemovals WHERE RemovalDate Between #" & sDate & "# And #" & eDate & "#") With rs rs.MoveFirst Do Until rs.EOF .Edit If Not IsNull(rs.Fields("Email")) Then em = rs.Fields("Email") Else em = "N/A" End If rs.Fields("SendReminder") = em rs.Update rs.MoveNext Loop End With rs.Close Set rs = Nothing Me.frmWebTimes.Requery


Updating Recordset
Reply With Quote


