Go Back   Access World Forums > Microsoft Access Discussion > General

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 12-02-2005, 08:26 AM   #1
L'apprentis
Redcifer
 
L'apprentis's Avatar
 
Join Date: Jun 2005
Location: Scotland Aberdeen
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
L'apprentis is on a distinguished road
Hyperlink?

I have created a very simple code to fill automaticly an hyperlink field when a text box is updated on a form:

Code:
Me.txtHyperlink = "F:\Data\CPP\CPP PDF\" & [TxtPipeSize] & "\" & [DrawingFile] & "\" & [PartNumber] & ".sht" & [TxtSheetNo] & ".Rev" & [TxtRevNo] & ".pdf"
TxtHyperlink is bound to the hyperlink field, when the code is executed the Hyperlink field is filled with the right address. but I think the code just fill the text to display "parameter" of the hyperlink field and not the actual adddress.
what should I do to get the result of the function to be saved as the Hyperlink address?

L'apprentis is offline   Reply With Quote
Old 12-02-2005, 09:39 AM   #2
Bat17
Newly Registered User
 
Join Date: Sep 2004
Location: Maidstone, Kent. UK
Posts: 1,687
Thanks: 0
Thanked 6 Times in 5 Posts
Bat17 is on a distinguished road
You need the # to seperate name from address, try
Me.txtHyperlink = "[PartNumber] & ".sht" & [TxtSheetNo] & ".Rev" & [TxtRevNo] & ".pdf#F:\Data\CPP\CPP PDF\" & [TxtPipeSize] & "\" & [DrawingFile] & "\" & [PartNumber] & ".sht" & [TxtSheetNo] & ".Rev" & [TxtRevNo] & ".pdf#"

HTH

Peter
Bat17 is offline   Reply With Quote
Old 12-05-2005, 03:46 AM   #3
L'apprentis
Redcifer
 
L'apprentis's Avatar
 
Join Date: Jun 2005
Location: Scotland Aberdeen
Posts: 177
Thanks: 0
Thanked 0 Times in 0 Posts
L'apprentis is on a distinguished road
Thanks again for your help,
You are correct : Hyperlink = DisplayText#Address#

L'apprentis is offline   Reply With Quote
Old 06-29-2007, 06:10 AM   #4
Zanatos
Registered User
 
Join Date: May 2007
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Zanatos is on a distinguished road
Hey guys,
I am experiencing the same problem that L'apprentis was facing, and upon trying your solution I have stumbled across an error of my own.

First of all, I am new to Access, I have this in my VB code, but don't if that's where it's supposed to be or if I wrote the Macro correctly.

Here's what I have:

Private Sub Hyperlink()
MyHyperlink = "[InspectionDocID]& ".pdf#Z:\Chris Sanders\Access\" &[InspectionDocID]& ".pdf#"
End Sub


The second I click off of it this happens:

Compile Error: Expected: End of Statement
Private Sub Hyperlink()
MyHyperlink = "[InspectionDocID]& ".pdf#Z:\Chris Sanders\Access\" &[InspectionDocID]& ".pdf#"
End Sub

The error highlights the . at the first ".pdf#Z:..."

Any ideas as to where I went wrong?
Zanatos is offline   Reply With Quote
Old 10-16-2007, 10:59 AM   #5
mscahill
Registered User
 
Join Date: Oct 2007
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mscahill is on a distinguished road
parse error

Take off the first set of quotes

mscahill is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing a Hyperlink daft General 9 09-17-2004 03:22 PM
Exporting Hyperlink to Word infinitx General 0 05-16-2004 09:41 AM
[SOLVED] Access hyperlink changed blooberrie General 1 09-13-2003 09:53 PM
Canceling a hyperlink kermit5 Forms 2 07-28-2003 07:16 AM
hyperlink and VBscript staypuffinpc General 1 02-13-2003 02:58 PM




All times are GMT -8. The time now is 04:12 PM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Sponsored Links

How to advertise

Media Kit


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World