Background: I have a folder full of pdf's that all have a "code" and a year in the name of the file that distinguishes what the file is.
For example:
File_1_HJ8DF_2010.pdf
File_2_HLKSSSF_2011.pdf
File_3_HJ99ISDF_2010.pdf
I am trying to figure out a way using vba in access 2010 to search for the file i am after by using the "code" and the year in the title of the file as search criteria. I have tried using the FileSystem Object in access but havent gotten very far becuase it needs an exact match to the file name in order to find it.
I have also thought about sorting the files into folders per year to eliminate one of the criteria to the search and make things easier. This is becuase there may be a file with the "code" "JS8SD" for 2011 and 2010 so i need to select the one for the year i am working with.
Ideally i would like to return the full path to the file i am looking for so i can do what ever i want with it after that. My programming experiance is limited as i have just started teaching myself vba about a month ago.
For example:
File_1_HJ8DF_2010.pdf
File_2_HLKSSSF_2011.pdf
File_3_HJ99ISDF_2010.pdf
I am trying to figure out a way using vba in access 2010 to search for the file i am after by using the "code" and the year in the title of the file as search criteria. I have tried using the FileSystem Object in access but havent gotten very far becuase it needs an exact match to the file name in order to find it.
I have also thought about sorting the files into folders per year to eliminate one of the criteria to the search and make things easier. This is becuase there may be a file with the "code" "JS8SD" for 2011 and 2010 so i need to select the one for the year i am working with.
Ideally i would like to return the full path to the file i am looking for so i can do what ever i want with it after that. My programming experiance is limited as i have just started teaching myself vba about a month ago.