I am trying to create an automatic load script, based on data that is stored in different Access databases by year (each year in a different database).
I only want to load the current year and the previous two. The year is indicated in the filename, so I would like the script to use the variable name in both the loop variable (For i=...) and the filename (PathName+i ).
Here is how far I got so far, of course not working correctly.
If you have any idea on how to proceed, I would really appreciate any help.
Let vCurrentYear = Year(Today());
Sub LoadData
For i = (Num($(vCurrentYear)–2)) To Num($(vCurrentYear))