Building a Hyperlink

  • Thread starter Thread starter Bob Irvine
  • Start date Start date
B

Bob Irvine

Starting with a base-address of something like:
"C:\Documents and Settings\user\My Documents\work\"
I have a control [Text-Box] which contains a valve. "WorkOrderNumberID"
The value in WorkOrderNumberID is only numeric and I need to add it to the
base address. [To open a specific folder under the Base-Address]
It will be a variable, based on which record the user is looking at, at the
time.
I think it's just the simple-fact that I do not know the Syntax.
I've tried things like; in the Hyperlink Address property of the new
Command-Button:
="C:\Documents and Settings\user\My Documents\work" & "\" & WorkOrderNumberID
I have the feeling that it's easy - I just need the proper Syntax...
Help? [ & thanx]

Bob...
 
Hopefully I understand what you want

Create a button
Create an OnClick event for it and use the following code

dim sBase as string
sBase = "C:\Documents and Settings\user\My Documents\work\"
Application.FollowHyperlink sBase & Me.TextBoxControlName


close and save

Now when you click on the button it should open the document/folder
--
Hope this helps,

Daniel Pineault
For Access Tips and Examples: http://www.cardaconsultants.com/en/msaccess.php
If this post was helpful, please rate it by using the vote buttons.
 
Thank You.... I played with it more after I posted the question and actually
got it to work with "Application.FollowHyperlink". However, I did not use the
"Me." in "Me.TextBoxControlName" but just the "TextBoxControlName".
Are there implications, or possible problems, down-the-road for not useing
the "Me."?
Thanks Again Daniel... [from this Back-Yard, Wanna-Be programmer] :-)

Daniel Pineault said:
Hopefully I understand what you want

Create a button
Create an OnClick event for it and use the following code

dim sBase as string
sBase = "C:\Documents and Settings\user\My Documents\work\"
Application.FollowHyperlink sBase & Me.TextBoxControlName


close and save

Now when you click on the button it should open the document/folder
--
Hope this helps,

Daniel Pineault
For Access Tips and Examples: http://www.cardaconsultants.com/en/msaccess.php
If this post was helpful, please rate it by using the vote buttons.



Bob Irvine said:
Starting with a base-address of something like:
"C:\Documents and Settings\user\My Documents\work\"
I have a control [Text-Box] which contains a valve. "WorkOrderNumberID"
The value in WorkOrderNumberID is only numeric and I need to add it to the
base address. [To open a specific folder under the Base-Address]
It will be a variable, based on which record the user is looking at, at the
time.
I think it's just the simple-fact that I do not know the Syntax.
I've tried things like; in the Hyperlink Address property of the new
Command-Button:
="C:\Documents and Settings\user\My Documents\work" & "\" & WorkOrderNumberID
I have the feeling that it's easy - I just need the proper Syntax...
Help? [ & thanx]

Bob...
 
Back
Top