Hi,
I am trying to link a picture to an access report as follows:
1. The location of the Picure is stored as a hyperlink field in a table
2. The On Load Event of the report triggers the following code"
I have 2 issues with this
My first issue is that whenever a hyperlink is saved in a table it shows the path incorrectly for example C:\Logo.jpg shows as "..\..\..\Logo. jpg" so the code doesn't recognise the path.
My second issue is that the hyperlink needs to be customisable by the user I have currently done this through the
command.
Is there an easier way the user can specify the location of the file, where the first abovemention issue is also avoided
Thanks
Kamal
I am trying to link a picture to an access report as follows:
1. The location of the Picure is stored as a hyperlink field in a table
2. The On Load Event of the report triggers the following code"
Code:
Private Sub Report_Load()
Set cnn = CurrentProject.Connection
'Table containing Logo Path
rst.Open "tblClientDetails", cnn, adOpenDynamic, adLockBatchOptimistic
With rst
Me.Logo.Picture = !Logo
End With
Set rst = Nothing
Set cnn = Nothing
End Sub
My first issue is that whenever a hyperlink is saved in a table it shows the path incorrectly for example C:\Logo.jpg shows as "..\..\..\Logo. jpg" so the code doesn't recognise the path.
My second issue is that the hyperlink needs to be customisable by the user I have currently done this through the
Code:
DoCmd.RunCommand acCmdInsertHyperlink
Is there an easier way the user can specify the location of the file, where the first abovemention issue is also avoided
Thanks
Kamal
Comment