Hi Everyone,
I am looking to create a button that opens a pdf document. I need some vba code because there is multiple subfolders that I need to look for and I cannot use Application.FollowHyperlink because the path is not the same for each file. So far I have a field in a form that has various numbers all 7 digits for example "0115553" and "0115554". I want to search for the right 6 digits in a folder that has multiple subfolders. The main folder is "Z:\2016-SHIPPING DOCUMENTS". Within this folder there are multiple sub folders such as "9-2016", "10-2016". Within the subfolders are pdf files like "115553", "115554" etc. The field on my form will usually have the format "0115553" and "0115554". I want to be able to search for just the right 6 digits in the date subfolders and open it with the click of a button. There is only one file across all subfolders (no duplicates). I am using access 2007 and I am a beginner.
I am looking to create a button that opens a pdf document. I need some vba code because there is multiple subfolders that I need to look for and I cannot use Application.FollowHyperlink because the path is not the same for each file. So far I have a field in a form that has various numbers all 7 digits for example "0115553" and "0115554". I want to search for the right 6 digits in a folder that has multiple subfolders. The main folder is "Z:\2016-SHIPPING DOCUMENTS". Within this folder there are multiple sub folders such as "9-2016", "10-2016". Within the subfolders are pdf files like "115553", "115554" etc. The field on my form will usually have the format "0115553" and "0115554". I want to be able to search for just the right 6 digits in the date subfolders and open it with the click of a button. There is only one file across all subfolders (no duplicates). I am using access 2007 and I am a beginner.