Hi Everyone
I am running the code below and get the following error:-
Any help appreciated
Code is:-
Code:
Dim strSQL As String
strSQL = "UPDATE [tblProgListing] SET CustProgID = " & Me.CustProgrammeID & ", ProgNo = " & Me.ProgNo _
& ", ProgDateCreated = " & Format(Me.ProgDateCreated, "\#dd\-mmm\-yyyy\#") & ", Code = '" & Me.Code _
& "' WHERE CustProgID is null And ProgNo is Null And ProgDateCreated is Null And Code is Null;"
Debug.Print strSQL
CurrentDb.Execute strSQL, dbFailOnError
The Immediate window produces all the correct data
Code:
UPDATE [tblProgListing] SET CustProgID = 24, ProgNo = 1, ProgDateCreated = #02-Feb-2021#, Code = 'L5' WHERE CustProgID is null And ProgNo is Null And ProgDateCreated is Null And Code is Null;