473,770 Members | 1,973 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Error 7980: HyperlinkAddres s or HyperlinkSubAdd ress read-only for Hyperlink

NeoPa
32,573 Recognized Expert Moderator MVP
Error 7980: The HyperlinkAddres s or HyperlinkSubAdd ress 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 Hyperlink and is editable without problem from the interface (I open the table for display, right-click on an item and select Hyperlink / Edit Hyperlink and all is fine).

The table is defined very simply as :
Table = tblLink
Expand|Select|Wrap|Line Numbers
  1. Field   Type        Index
  2. LinkID  Autonumber  PK
  3. Link    Hyperlink
I run into problems however, when I try to update (or even add a new one from scratch) this item on my form. The form is laid out as :
Form = tblLinkEdit
Expand|Select|Wrap|Line Numbers
  1. Control         Type    Bound
  2. txtLinkID       TextBox   Y
  3. txtDescription  TextBox
  4. txtHTTP         TextBox
  5. txtLink         TextBox   Y
The operator fills in both of the unbound TextBoxes, then the code should create a Hyperlink in txtLink from what's entered.

The code for the update (AfterUpdate of both of the unbound TextBoxes) is as follows (txtLink is designed as locked so no-one tries to edit it in place) :
Expand|Select|Wrap|Line Numbers
  1. Private Sub txtDescription_AfterUpdate()
  2.     Call UpdateLink
  3. End Sub
  4.  
  5. Private Sub txtHTTP_AfterUpdate()
  6.     Call UpdateLink
  7. End Sub
  8.  
  9. Private Sub UpdateLink()
  10.     With Me.txtLink
  11.         .Locked = False
  12.         .Value = Me.txtDescription
  13.         .Hyperlink.Address = Me.txtHTTP
  14.         .Locked = True
  15.     End With
  16. End Sub
I've tried various other ways of approaching this problem but as none of them has shown any success, I won't bore you with the details. Suffice to say I tried editing the existing Hyperlink as well as attempting to build it from scratch as in this code.

When it gets to line #13 the error message of the title pops up :
Error 7980: The HyperlinkAddres s or HyperlinkSubAdd ress property is read-only for this hyperlink

NB. I find it particularly confusing as the property I'm attempting to assign is neither of those of course.

I'd be grateful for any sort of assistance. If anyone can simply point me to where to look that would be fine.
Oct 10 '09 #1
1 9826
NeoPa
32,573 Recognized Expert Moderator MVP
Although this particular problem is still confusing me, I did eventually find (by looking differently) something that helped me to do what I needed without accessing the .Hyperlink property directly.

The page I found (Introduction to Hyperlink fields) was from Allen Browne's site. The concept is simply to set the .Value of the TextBox to a three way string comprising Description#Link#Sublink (Sublink optional).

My final code is :
Expand|Select|Wrap|Line Numbers
  1. Private Sub UpdateLink()
  2.     With Me
  3.         .txtLink.Locked = False
  4.         '+ used with strings resolves to Null if any element is Null.
  5.         Select Case "" + .txtDescription + .txtHTTP
  6.         Case Null
  7.             .txtLink = .txtDescription & .txtHTTP
  8.         Case Else
  9.             .txtLink = .txtDescription & "#" & Me.txtHTTP & "#"
  10.         End Select
  11.         .txtLink.Locked = True
  12.     End With
  13. End Sub
The best part of it all is - It works!
Oct 10 '09 #2

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

Similar topics

2
6118
by: John F Dutcher | last post by:
Can anyone comment on why the code shown in the Python error is in some way incorrect...or is there a problem with Python on my hoster's site ?? The highlites don't seem to show here...but line #80 and line # 38 are the first line offenders. --> --> -->
0
3045
by: Morten Gulbrandsen | last post by:
mysql> USE company; Database changed mysql> mysql> DROP TABLE IF EXISTS EMPLOYEE; -------------- DROP TABLE IF EXISTS EMPLOYEE -------------- Query OK, 0 rows affected (0.00 sec)
4
2433
by: Bill Cohagan | last post by:
I'm writing a console app in c# and am encountering a strange problem. I'm trying to use redirection of the standard input stream to read input from a (xml) file. The following code snippet is from this app: =============================== static void Main(string args) { if (args.Length > 0) Console.SetIn(new StreamReader(args)); //executes if I don't use the "<", ">" redirection syntax when invoking XmlTextReader xmlin = new...
2
4069
by: GB | last post by:
Hi Everybody! I have 2 different processes/application. One is writing to a file and another is reading from it. For some reason the code doesnt seems to work and gives mscorlib.dll IOException error "This file is being used by another process". Both the applications are in C#. P.S. Even if I try to open the file with NotePad (while my server is writing data in the file)it gives the same error.
3
14014
by: James | last post by:
Hi, I am developing a ActiveX Control which will be used in a web page. The control will encrypt some value then decrypt it when the web page opens next time. I tested the control in a windows application and it works fine and no error jumps. However, when I tried to use it in a web page, problems came. There is no problem for encrypting but the decrypting can't be finished. The error jumped from the line below
6
4740
by: Nakhi | last post by:
Hi, my code is very simple. dim cm as oledbcommand= new oledbcommand("select * from page " ,cn) cn.open() Dim dr As OleDbDataReader = cm.ExecuteReader() dim cate=dr.getstring(1) 'error line" label1.text=cate but there is error for dr.getstring(1), the error reads:the data of this
8
1959
by: mohit | last post by:
Hi, I am creating a web application in Web Matrix on the .NET framework. I have two directories :AddUser and FormAuth in a Directory P. AddUser contains a file AddUser.aspx FormAuth contains : Default.aspx , Users.xml , Login.aspx I have the following code :
2
2757
by: dasilva109 | last post by:
Hi guys I am new to C++ and need urgent help with this part of my code for a uni coursework I have to submit by Thursday //ClientData.h #ifndef CLIENTDATA_H #define CLIENTDATA_H #include <string>
2
2338
by: arun1985 | last post by:
In the project i am using i am having the following code and when i upload it to the server.Its givig me the following error in the global.cs file. Server Error in '/' Application. -------------------------------------------------------------------------------- Object reference not set to an instance of an object. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack...
0
6611
by: .nLL | last post by:
Erorr is --------------------- Microsoft VBScript runtime error '800a0046' Permission denied /a.asp, line 3 -----------------------
0
9618
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9454
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10101
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10038
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9906
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7456
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2849
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.