I have an table in MS Access in which I have got date wise sales figure for different product in three different columns (one column for date, one for the product code & the third for sales figure). I want the program to find the last "sales figure" for a particular product in the sales column (by going backward) which was less than the last day's figure (or for any specified date) and then stop looking further & provide the data in the fourth column. Then the program should repeat the step & provide the figure less than the figure found in the previous step in the fifth column.
Here with I am attaching the file for reference. The file contains two table. The first one is the original table named "SALES" & the second one is "SALES_REQD" which is a sample table in which I have manually entered the required data for one particular product for a very small period. I want the same result in the "SALES" table for multiple product & for a long period.
Please suggest a method by using query, macro, VBA code or any other method you can think of. Please help as I am stuck with this problem & really need to get out of it.
Thanks & regards
Here with I am attaching the file for reference. The file contains two table. The first one is the original table named "SALES" & the second one is "SALES_REQD" which is a sample table in which I have manually entered the required data for one particular product for a very small period. I want the same result in the "SALES" table for multiple product & for a long period.
Please suggest a method by using query, macro, VBA code or any other method you can think of. Please help as I am stuck with this problem & really need to get out of it.
Thanks & regards