hansretallick
Technical User
I am trying to open a web page using four fields selected from a table as part of the URL. I think I have tied myself in knots with inverted commas, and I would be grateful if anyone can point me in the right direction.
My VBA code is as follows:
Dim MyHyperlink As String
MyHyperlink = DoCmd.RunSQL "SELECT tblClients.Ref, ( [tblEPC.Field1] & "," & [tblEPC.Field2] & "," & [tblEPC.Field3] & "," & [tblEPC.Field4] ) AS MyHyperlink " & _
"FROM (tblHIP INNER JOIN tblClients ON tblHIP.PropID=tblClients.ID) LEFT JOIN tblEPC ON tblHIP.HIPID=tblEPC.HIPID " & _
"WHERE (((tblClients.Ref)=Forms!frmEPCAdministration!Combo1995))"
DoCmd.RunSQL MyHyperlink
Application.FollowHyperlink _
MyHyperlink
My VBA code is as follows:
Dim MyHyperlink As String
MyHyperlink = DoCmd.RunSQL "SELECT tblClients.Ref, ( [tblEPC.Field1] & "," & [tblEPC.Field2] & "," & [tblEPC.Field3] & "," & [tblEPC.Field4] ) AS MyHyperlink " & _
"FROM (tblHIP INNER JOIN tblClients ON tblHIP.PropID=tblClients.ID) LEFT JOIN tblEPC ON tblHIP.HIPID=tblEPC.HIPID " & _
"WHERE (((tblClients.Ref)=Forms!frmEPCAdministration!Combo1995))"
DoCmd.RunSQL MyHyperlink
Application.FollowHyperlink _
MyHyperlink