- Code: Select all
Dim strSQL As String
strSQL = "UPDATE tControl SET ctrlDate = '" & Format(DTP.Value, "mm/dd/yyyy") & "' " & _
" WHERE CurrentBatchID = " & BatId & " AND coNum=" & comp
Debug.Print strSQL 'copy the fully made string to VB's Immediate window, so you can spot issues.
db.Execute strSQL, dbFailOnError


