I have an Access 2010 dB that has a table that is linked to a SharePoint list. I need to be able to track changes in the fields in the SP list table.
I created a table to store the current values of the list records.
I created another table to store a record of the current and new values of three fields and the date of the change.
I created a query to populate the table of changes
Code:
INSERT INTO CRChanges ( CRID, NewCRStatus, [Admin Only],Decision, ChangeDate, OldCRStatus )
SELECT [Change Request Intake].ID, [Change RequestIntake].[Change Request Status], [Change Request Intake].[For Admin Only],[Change Request Intake].Decision, Date() AS Expr1, CurrentStatus.[ChangeRequest Status]
FROM [Change Request Intake] INNER JOIN CurrentStatus ON[Change Request Intake].ID = CurrentStatus.ID
WHERE ((([Change Request Intake].[Change RequestStatus])<>[CurrentStatus]![Change Request Status])) OR ((([Change RequestIntake].[For Admin Only])<>[CurrentStatus]![For Admin Only])) OR((([Change Request Intake].Decision)<>[CurrentStatus]![Decision]));
When I run the query changes to [Change Request Status] are recorded but changes to [For Admin Only] and to [Decision] are not. All three are text fields. I've verified that the values in the [CurrentStatus] table are in fact different. I've tried isolating the three Where conditions into separate queries and the only one that works is the Change Request Status query.
I think it should work as is since the [Change Request Status] comparison works. Is there a function I should be using instead of <> for comparing text values?
Thanks
Paul