I have an INSERT statement that I'm executing from Access 2010 on a linked table in SQL Server. It goes like this:
INSERT INTO TableA (JobStatus) SELECT ' " & IIf(PrintFlag = -1, "In Work", "Pending") & " ' FROM TableA INNER JOIN TableB"
DoCmd.RunSQL strSQL
The problem is that a JobStatus of "In Work" is never getting assigned even if PrintFlag = -1. Note that TableA is an SQL Server linked table and TableB is a local table in Access.
Any reason this wouldn't work?