Go Back   Access World Forums > Microsoft Access Discussion > Tables

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 03-17-2019, 06:49 AM   #1
Accessbeginner34
Newly Registered User
 
Join Date: Mar 2019
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Accessbeginner34 is on a distinguished road
Hyperlinks

Hi - I have a current table which is linked to excel. In excel I have a column which contains a hyperlink to a specific folder for each row.

In Access I want to have this hyperlink on a from so that each record has a link which points it to a different folder on my drive. In the design view of the table I have tried to change the data type to hyperlink but I just get the error message operation is not supported for this type of object. I have also tried changing a blank column to hyperlink data type but get the same message.

Any ideas where I am going wrong?


Thanks in advance

Accessbeginner34 is offline   Reply With Quote
Old 03-17-2019, 07:05 AM   #2
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 1,153
Thanks: 12
Thanked 265 Times in 258 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Hyperlinks

Hi. Are you saying you’re trying to modify the design of a linked table to Excel?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 03-17-2019, 07:06 AM   #3
Accessbeginner34
Newly Registered User
 
Join Date: Mar 2019
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Accessbeginner34 is on a distinguished road
Re: Hyperlinks

Yes I think so - sorry new to all this.

Accessbeginner34 is offline   Reply With Quote
Old 03-17-2019, 07:10 AM   #4
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 1,153
Thanks: 12
Thanked 265 Times in 258 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Hyperlinks

Well, if that’s the case, you won’t be able to, because linked table designs are not changeable. In any case, you won’t really need to change the table design anyway. You should be able to use code to make the hyperlink work. For example, you could try the FollowHyperlink method.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 03-17-2019, 07:12 AM   #5
Accessbeginner34
Newly Registered User
 
Join Date: Mar 2019
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Accessbeginner34 is on a distinguished road
Re: Hyperlinks

Okay I see, sorry what is the FollowHyperlink method and how do I use this in access?
Accessbeginner34 is offline   Reply With Quote
Old 03-17-2019, 07:47 AM   #6
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 1,153
Thanks: 12
Thanked 265 Times in 258 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Hyperlinks

You would use it on a form. For example, in the Click event of the field or a button, you could try Application.FollowHyperlink [FieldName]
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 03-17-2019, 08:08 AM   #7
Accessbeginner34
Newly Registered User
 
Join Date: Mar 2019
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Accessbeginner34 is on a distinguished road
Re: Hyperlinks

Thanks - okay so this is what is now showing. Is that right? Lease is the column name in my excel table. The control source us set to Lease.

Private Sub Text172_Click()
Application.FollowHyperlink [Lease]
End Sub

I am getting a message saying Run time error 94 - invalid use of null. Any ideas?

Accessbeginner34 is offline   Reply With Quote
Old 03-17-2019, 08:27 AM   #8
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 1,153
Thanks: 12
Thanked 265 Times in 258 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Hyperlinks

Hi. If you’re getting that error, it means Lease is empty. Try the code on a non-empty field.
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 03-17-2019, 08:32 AM   #9
Accessbeginner34
Newly Registered User
 
Join Date: Mar 2019
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Accessbeginner34 is on a distinguished road
Re: Hyperlinks

That痴 strange because that痴 the column in excel that contains the hyperlinks for each row?
Accessbeginner34 is offline   Reply With Quote
Old 03-17-2019, 08:33 AM   #10
theDBguy
I知 here to help
 
theDBguy's Avatar
 
Join Date: Oct 2018
Location: SunnySandyEggo
Posts: 1,153
Thanks: 12
Thanked 265 Times in 258 Posts
theDBguy will become famous soon enough theDBguy will become famous soon enough
Re: Hyperlinks

What is the value of Lease when you click on the form?
__________________
Just my 2 cents...

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
|
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
theDBguy is online now   Reply With Quote
Old 03-17-2019, 08:35 AM   #11
Accessbeginner34
Newly Registered User
 
Join Date: Mar 2019
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Accessbeginner34 is on a distinguished road
Re: Hyperlinks

I don’t have this on my form - just in the source table
Accessbeginner34 is offline   Reply With Quote
Old 03-17-2019, 11:47 AM   #12
Cronk
Newly Registered User
 
Join Date: Jul 2013
Posts: 2,032
Thanks: 3
Thanked 441 Times in 434 Posts
Cronk will become famous soon enough Cronk will become famous soon enough
Re: Hyperlinks

Why do you expect Access to know that some unnamed spreadsheet has a column named Lease?


In Access, create a link to your spreadsheet ie a linked table. If the column named Lease in Excel has the entry Lease in the first row of the column, Access will allocate that to the field name in Access. If not, in Access the field will be called Fx where x is the column number in Excel.


You did not indicate whether there is one hyperlink or many. If the latter, you could use dLookup() to get the hyperlink for a particular row. Without more information about the names of the linked table fields and which contains the search information, I cannot be more specific.
Cronk is offline   Reply With Quote
Old 03-17-2019, 12:02 PM   #13
Accessbeginner34
Newly Registered User
 
Join Date: Mar 2019
Posts: 31
Thanks: 1
Thanked 0 Times in 0 Posts
Accessbeginner34 is on a distinguished road
Re: Hyperlinks

Hi - the Access table is linked to a table in Excel which has the header Lease. Within this column in Excel (AO) most (but not all) of the rows have a hyperlink which leads to a folder where the lease for the property on that row is saved on the network drive.

So in access I want to have a link for each record to the relevant hyperlink in the table and therefore the lease folder on the network drive. I have tried to follow the advice given before and set the Text Box control source to the Lease field and added an event on Click of

Private Sub Text172_Click()
Application.FollowHyperlink [Lease]
End Sub

I am no longer getting the error message I had before and the text box is now displaying the hyperlink from the excel table but when I click on it nothing happens.

Any suggestions. thanks.
Accessbeginner34 is offline   Reply With Quote
Old 03-17-2019, 12:27 PM   #14
June7
Newly Registered User
 
June7's Avatar
 
Join Date: Mar 2014
Posts: 1,395
Thanks: 0
Thanked 340 Times in 339 Posts
June7 will become famous soon enough
Re: Hyperlinks

Hyperlink question answered in related thread https://access-programmers.co.uk/for...d.php?t=304293

__________________
To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression. Attachment Manager is below Advanced editor window, click Go Advanced below Quick Reply window.
DEBUG! DEBUG! DEBUG!
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
June7 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
Hyperlinks painnbt Macros 4 11-13-2012 09:12 AM
hyperlinks christophergreen Forms 7 11-22-2009 11:17 AM
hyperlinks paulevans General 4 06-04-2007 08:27 AM
Hyperlinks.add dgkindy Modules & VBA 7 04-28-2007 10:51 AM
hyperlinks mikeder General 2 02-14-2003 07:47 AM




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


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

Featured Forum post


Sponsored Links


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