I am trying to update tblPending with Send (Y/N) , if it is Yes then update to No. Do I need to use True / False?
Thanks for your help.
[Private Sub Report_Close()
'Closed Event is processed last
'This procedure in table pending will remove yes in send
On Error GoTo ErrorHandler
Dim sql As String
Dim rs As ADODB.Recordset
sql = "SELECT * FROM tblPending WHERE Send = Yes"
Set rs = New ADODB.Recordset
rs.Open sql, CurrentProject.Connection, adOpenDynamic, adLockOptimistic
With rs
If Not .BOF And Not .EOF Then
.MoveLast
.MoveFirst
If .Supports(adUpdate) Then
Do Until .EOF
![Send] = "No" & ![Send]
.Update
.MoveNext
Loop
End If
End If
.Close
End With
ExitSub:
Set rs = Nothing
Exit Sub
ErrorHandler:
Resume ExitSub
End Sub