philfloyduk
Board Regular
- Joined
- Jan 6, 2011
- Messages
- 82
Hi.
I have set my repair management form up to be able to view the PDF invoice that is generated when a repair is completed. When the repair is completed it generates the PDF autmatically and puts the file location in a textbox. Next to the textbox I have put a command button 'view' which has the following code to allow the user to view the PDF:
If tbViewPDF.Value = True Then
With Me.AcroPDF1
.LoadFile tbPDFFileExtension.Value
.setShowToolbar (True)
.gotoFirstPage
End With
AcroPDF1.Visible = True
Else
AcroPDF1.Visible = False
End If
This works fine.
I then copied the same method for the form I use to manage our sales, used the same textbox with the same name (copied it from the repairs form and pasted it to the sales form), and pasted the code above the the command button that... I'd copied and pasted, but it doesn't work! I've checked everything countless times to make sure there are not mistakes and it is literally identical. I don't get an error, it just doesn't display. I've tried setting the .visible to true by default and loading it that way, I've also put a specific file location in the code so it loads a particular PDF but it still doesn't display it. Does anyone have any ideas?
Any help will be much appreciated.
Thanks in advance,
Phil.
I have set my repair management form up to be able to view the PDF invoice that is generated when a repair is completed. When the repair is completed it generates the PDF autmatically and puts the file location in a textbox. Next to the textbox I have put a command button 'view' which has the following code to allow the user to view the PDF:
If tbViewPDF.Value = True Then
With Me.AcroPDF1
.LoadFile tbPDFFileExtension.Value
.setShowToolbar (True)
.gotoFirstPage
End With
AcroPDF1.Visible = True
Else
AcroPDF1.Visible = False
End If
This works fine.
I then copied the same method for the form I use to manage our sales, used the same textbox with the same name (copied it from the repairs form and pasted it to the sales form), and pasted the code above the the command button that... I'd copied and pasted, but it doesn't work! I've checked everything countless times to make sure there are not mistakes and it is literally identical. I don't get an error, it just doesn't display. I've tried setting the .visible to true by default and loading it that way, I've also put a specific file location in the code so it loads a particular PDF but it still doesn't display it. Does anyone have any ideas?
Any help will be much appreciated.
Thanks in advance,
Phil.