I am trying to run a query which shows the values of all products from yesterday and lets me enter new data for today.
SELECT [Daily Value].Date, [Daily Value].Symbol, [Daily Value].[Current Value], [Daily Value_1].[Current Value] AS Yesterday, [Daily Value].[current value]-[yesterday] AS Change
FROM [Daily Value] AS [Daily Value_1] INNER JOIN [Daily Value] ON [Daily Value_1].Symbol = [Daily Value].Symbol
WHERE ((([Daily Value].Date)=[Date?]) AND (([Daily Value_1].Date)=[Daily Value].[Date]-1));
I enter today's date. All of the pertinent product symbols come up with the correct pricing. However, I can't enter any new data. I have to manually enter the new prices into the underlying table.
I suspect this has to do with selecting yesterday's date with a join from the same table. Hope this makes sense!! Thanks for your help. I have reviewed every post on queries in this forum. (And yes, I know that we shouldn't use the word "Date" as a field name. I inherited that one. However, if you think it would help, I can change that.)
SELECT [Daily Value].Date, [Daily Value].Symbol, [Daily Value].[Current Value], [Daily Value_1].[Current Value] AS Yesterday, [Daily Value].[current value]-[yesterday] AS Change
FROM [Daily Value] AS [Daily Value_1] INNER JOIN [Daily Value] ON [Daily Value_1].Symbol = [Daily Value].Symbol
WHERE ((([Daily Value].Date)=[Date?]) AND (([Daily Value_1].Date)=[Daily Value].[Date]-1));
I enter today's date. All of the pertinent product symbols come up with the correct pricing. However, I can't enter any new data. I have to manually enter the new prices into the underlying table.
I suspect this has to do with selecting yesterday's date with a join from the same table. Hope this makes sense!! Thanks for your help. I have reviewed every post on queries in this forum. (And yes, I know that we shouldn't use the word "Date" as a field name. I inherited that one. However, if you think it would help, I can change that.)