Hello everyone,
This is the 3rd issue I am posting on this forum and have so far been extremely grateful with the quality and speed of responses. Here is my latest issue:
I have a table, "Daily_Volume", that has 3 fields "LogDate" (dd/mm/yyyy), Volume (Currency), and RecordCount (Count of year to date entries)
I have a query that calculates the running total and average for month to date. I need to create another field which is able to lookup the volume numbers from the previous year and display them next to the volume numbers for the current year. Since dates change each year, it would suffice to show the 2008 volume next to the 2009 volume based on the record count field (e.g. by matching the 20th record of 2008 with the 20th record of 2009).
I figured I should use the Dlookup function where record count is the same and the year is Year(LogDate)-1. However I cannot get this code to work. Maybe I should also be using a DateAdd function? Please let me know if you need any further clarification.
Any ideas would be greatly appreicated! I thank you all in advance and wish you happy holidays!
Ben
This is the 3rd issue I am posting on this forum and have so far been extremely grateful with the quality and speed of responses. Here is my latest issue:
I have a table, "Daily_Volume", that has 3 fields "LogDate" (dd/mm/yyyy), Volume (Currency), and RecordCount (Count of year to date entries)
I have a query that calculates the running total and average for month to date. I need to create another field which is able to lookup the volume numbers from the previous year and display them next to the volume numbers for the current year. Since dates change each year, it would suffice to show the 2008 volume next to the 2009 volume based on the record count field (e.g. by matching the 20th record of 2008 with the 20th record of 2009).
I figured I should use the Dlookup function where record count is the same and the year is Year(LogDate)-1. However I cannot get this code to work. Maybe I should also be using a DateAdd function? Please let me know if you need any further clarification.
Any ideas would be greatly appreicated! I thank you all in advance and wish you happy holidays!
Ben