I have some code where this works fine
I'm trying to add a second condition and the syntax is wrong. What's my mistake?Code:With rs .Open "SELECT * FROM Requests where RequestType = '" & Cells(Target.Row, 1) & "'", cn, adOpenKeyset, adLockOptimistic, adCmdText .Fields("Status").Value = Cells(Target.Row, 4).Value .Fields("Notes").Value = Cells(Target.Row, 6).Value .Update End With
Code:.Open "SELECT * FROM Requests where RequestType = '" & Cells(Target.Row, 1) & "' AND DateCreated = '" & cells(target.Row, 2) & "'", cn, adOpenKeyset, adLockOptimistic, adCmdText


Reply With Quote