swingtones
New member
- Local time
- Today, 06:26
- Joined
- Apr 2, 2013
- Messages
- 6
I'm sure this is a commonly asked question but I couldn't find an answer that I could understand on a search of the forum. Perhaps I didn't ask the right question !
I need to open a specific pdf file per record by using a command button.
The pdf files will all reside in a specific folder in a partition on my hard drive.
Each pdf file will have a unique four digit file name e.g 1234.pdf
The file name will match a unique number allocated to each record.
This number is generated by adding 1000 to the record ID
Record 10 will therefore have an associated pdf file name of 1010.pdf
I have created a text box field , named 'TestReportID', to capture the unique four digit number per record that I assume is needed to be referred to when setting up the code to find and display the correct related pdf file.
I have set up a command button on the records form and as simple test using the hyperlink address to the folder where the pdf files reside, I can open a pdf file by clicking on the command button but it does not matter what record is open when I click the command button, it will always open the same pdf file.
If I don't identify a specific file name in the hyperlink address, when I click on the button it will display a file open dialog which lists all the relevant pdf files and I can then select and open the required file.
I would like to cut out that step and get the correct file to open when I click the button.
Any help that can point me in the right direction would be greatly appreciated
I guess what I'm asking is what code do I need to write where should it be placed
thanks
Ted
I need to open a specific pdf file per record by using a command button.
The pdf files will all reside in a specific folder in a partition on my hard drive.
Each pdf file will have a unique four digit file name e.g 1234.pdf
The file name will match a unique number allocated to each record.
This number is generated by adding 1000 to the record ID
Record 10 will therefore have an associated pdf file name of 1010.pdf
I have created a text box field , named 'TestReportID', to capture the unique four digit number per record that I assume is needed to be referred to when setting up the code to find and display the correct related pdf file.
I have set up a command button on the records form and as simple test using the hyperlink address to the folder where the pdf files reside, I can open a pdf file by clicking on the command button but it does not matter what record is open when I click the command button, it will always open the same pdf file.
If I don't identify a specific file name in the hyperlink address, when I click on the button it will display a file open dialog which lists all the relevant pdf files and I can then select and open the required file.
I would like to cut out that step and get the correct file to open when I click the button.
Any help that can point me in the right direction would be greatly appreciated
I guess what I'm asking is what code do I need to write where should it be placed
thanks
Ted