473,379 Members | 1,379 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

Anyway to remove #hyperlink# from .Value Property?

rsmccli
52
Hello,

Using Access 2002

I have a function that will accept a path to a document as a string, then open and print it. I have a table (tblScopeHyperlinks) that saves all hyperlinks inputted from a subform's (frmScopeHyperlinks) textbox.I have been trying to make a command button that will loop through all of these hyperlink records in the table, with the value of each entry as the variable (path to document).

My problem is that the .Value of a hyperlink is always returned as :

C:\folder\document.doc#C:\folder\document.doc#

and so the address is not right.

So:
Is there a property that will return just the text name of a hyperlink?

I have also tried adding a "Text Link Adress" field in the table so there would be a normal text version of each hyperlink. This updates from additional textbox on the subform that will copy the .Value when a hyperlink is inputted. This, of course, also updates as above.

Any ideas would be welcome, thanks

rsmccli
Jan 31 '08 #1
2 6694
ADezii
8,834 Expert 8TB
Hello,

Using Access 2002

I have a function that will accept a path to a document as a string, then open and print it. I have a table (tblScopeHyperlinks) that saves all hyperlinks inputted from a subform's (frmScopeHyperlinks) textbox.I have been trying to make a command button that will loop through all of these hyperlink records in the table, with the value of each entry as the variable (path to document).

My problem is that the .Value of a hyperlink is always returned as :

C:\folder\document.doc#C:\folder\document.doc#

and so the address is not right.

So:
Is there a property that will return just the text name of a hyperlink?

I have also tried adding a "Text Link Adress" field in the table so there would be a normal text version of each hyperlink. This updates from additional textbox on the subform that will copy the .Value when a hyperlink is inputted. This, of course, also updates as above.

Any ideas would be welcome, thanks

rsmccli
To return the Hyperlink Address from a Text Field named txtHyperlink on a Form:
Expand|Select|Wrap|Line Numbers
  1. Dim HLink As Hyperlink
  2.  
  3. Set HLink = Me![txtHyperlink].Hyperlink
  4. MsgBox HLink.Address
Jan 31 '08 #2
rsmccli
52
I used Mid and InStr to extract the address only from the hyperlink value.
Expand|Select|Wrap|Line Numbers
  1. '....
  2.  
  3.   With rs
  4.     rs.MoveFirst
  5.     Do Until rs.EOF
  6.       strDocumentPath = Mid(rs.Fields("hyplink"), 1, (InStr(rs.Fields("hypLink"), "#") - 1))
  7.       Call ExecuteFile(strDocumentPath, "Print")
  8.     rs.MoveNext
  9.     Loop
  10.   End With
Thank you very much for your reply.
Jan 31 '08 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

7
by: G. Dean Blake | last post by:
I have a hyperlink on my aspx page added at dev time. Is there a way to execute it from code? Thanks, G
9
by: Paul | last post by:
Hi I have a data grid with a hyperlink column. the colum has numbers like 00001,000002, ect. Just wondering how to get the text value of the cell as tempstring =...
2
by: BobRoyAce | last post by:
I am brand new to ASP.NET and am now required to take over maintenance of a ..NET/C# web application. On one of the pages I'm working on there is a DataGrid which has multiple columns. One of the...
19
by: Joe | last post by:
I have an aspx page (referred to here as page_1) with a datagrid whose first column contains hyperlinks. When a user clicks one of these hyperlinks, he will navigate to another aspx page (referred...
3
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I...
7
by: ashtek | last post by:
I have an <ASP:HYPERLINKon a datagrid (templatecolumn) and I need to open a new window with no toolbar and specific height & width onclick of the link. I also want to pass the PK to this new...
3
by: Nathan Sokalski | last post by:
I am using the ImageUrl property of the HyperLink control. My image is large, so I am setting the width/height attributes, but when it renders the width/height attributes are in the <atag rather...
1
by: sivasrec | last post by:
Hi, This is sivakumar from India. Now I am learning to ASP.NET 2.0.. I have a doubt.... I have used in a one hidden field control, 2 label controls, 2 button controls and...
1
NeoPa
by: NeoPa | last post by:
Error 7980: The HyperlinkAddress or HyperlinkSubAddress property is read-only for this hyperlink I'm struggling with some code to update Hyperlinks in my table. The field is defined as a...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.