Lilly
Lilly

Reputation: 233

UPDATE sql not updating

I'm having an issue with this UPDATE sql, for some reason it's not updating table NOMI. I'm not getting any type of error. I'm updating this table with values from another table which is where the Me.(...) is getting their values. When I do Debug.Print I'm getting this:

UPDATE NOMI SET workername = 'Bob', dateassigned = #5/27/2015 8:52:52 PM#, actiondate = #5/30/2015 11:56:43 AM#, caseid = 'BO09999', lastname = 'Smith', firstname = 'Jane', Program = 'Awesome', language = 'English', Status = 'Unprocessed' WHERE ((IsNull([caseid]))<>False)

Here is the code:

strSQL = "UPDATE NOMI SET workername = '" & Me.workername & "', 
dateassigned = #" & Me.dateassigned & "#, actiondate = #" & Now & "#, 
caseid = '" & Me.caseid & "', lastname = '" & Me.lastname & "', 
firstname = '" & Me.firstname & "', Program = '" & Me.program & "', 
language = '" & Me.language & "', Status = '" & Me.Status & "' 
WHERE ((IsNull([caseid]))<>False)"

CurrentDb.Execute strSQL

Upvotes: 3

Views: 123

Answers (1)

Andomar
Andomar

Reputation: 238296

This:

WHERE ((IsNull([caseid]))<>False)

Basically means:

WHERE caseid is null

Which might not be true for any row in the table. Certainly if caseid is a primary key, it cannot be null.

Upvotes: 1

Related Questions