Reading a hyperlink from a table and inserting it into the hyperlink property...

I would like to know how to read a hyperlink from a table and then in turn
insert that hyperlink into the hyperlink property of a command button to
execute it.  

My database has serveral hyperlinks stored in the fields of a table.

Thank you in advance

Max

0
MaxGay
10/16/2007 2:15:38 PM
access.formscoding 7493 articles. 0 followers. Follow

2 Replies
1042 Views

Similar Articles

[PageSpeed] 22

    strHyperlink = HyperlinkPart(Trim(Nz(Me!lnkDescription.Value, "")), 
acAddress)
    strLinkName = HyperlinkPart(Trim(Nz(Me!lnkDescription.Value, "")), 
acDisplayText)
    int_PPT_Pg_Nbr = HyperlinkPart(Trim(Nz(Me!lnkDescription.Value, "")), 
acSubAddress)
    str_ToolTip_PPT = HyperlinkPart(Trim(Nz(Me!lnkDescription.Value, "")), 
acScreenTip)

        Me.control.Visible = True
        Me.control.HyperlinkAddress = strHyperlink
        Me.control.HyperlinkSubAddress = Trim(str(int_PPT_Pg_Nbr))
        Me.control.Caption = str_ToolTip_PPT
        
Hyperlinks are text strings with four parts delimited by "#"
display text#web or lan address#sub address#tooltip
Sub address depends on the target. PowerPoint is a page number.
Excel is a range name.
etc.

-- 
Pictou


"MaxGay" wrote:

> I would like to know how to read a hyperlink from a table and then in turn
> insert that hyperlink into the hyperlink property of a command button to
> execute it.  
> 
> My database has serveral hyperlinks stored in the fields of a table.
> 
> Thank you in advance
> 
> Max
> 
> 
0
Utf
10/16/2007 3:25:01 PM
Max,

I find it easiest to just use the application.followhyperlink method.  In 
the Click event of the command button, retrieve the hyperlink address (file 
name or url)

Private sub cmd_Open_Hyperlink_Click

    Dim strHyperlink as string
    strHyperlink = dlookup("HyperlinkAddress", "yourTable", "ID = " & me.ID)

    'there are a couple of other parameters available for this method but this
    'is the easiest method
    application.followhyperlink (strHyperlink)

End Sub

HTH
Dale
-- 
Email address is not valid.
Please reply to newsgroup only.


"MaxGay" wrote:

> I would like to know how to read a hyperlink from a table and then in turn
> insert that hyperlink into the hyperlink property of a command button to
> execute it.  
> 
> My database has serveral hyperlinks stored in the fields of a table.
> 
> Thank you in advance
> 
> Max
> 
> 
0
Utf
10/16/2007 8:22:00 PM
Reply:

Similar Artilces:

files opened read only
I had the same problem as a recent post and tried the solution provided of finding and deleting files of type ~*.do? and ~*.wbk but when the search is run, it returns all files of type *.do? and *.wbk apparently ignoring the ~ in the search criteria. Many thousands of files are returned from the search. I have windows 7. The search works fine in XP What am I doing wrong? -- Thanks for your help - jjk98 ...

Converting heading/table/figure fields correctly to .pdf?
I'm using Microsoft Word 2007. So here's the problem. I have a very long document (300+ pages) that has made very good use of the list styles for headings, tables, and figures so that when the document is changed, the fields are automatically updated (almost a necessity with how much it is edited, and the size of the document). The problem is, we often times have to publish this document to a .pdf. When using the Word 2007 default "Publish to PDF or XDS" function, it drops the heading numbers from the headings in the bookmarks on the .pdf (i.e. the bookmarks...

Truncated pictures when inserted at end of page
When I insert a picture at the end of the page and the picture's size forces it to the next page, the bottom of the picture is truncated. Size doesn't seem to matter; 100% plus or minus, the picture is truncated. Anyone know why? Putting it in a table cell solves the problem, but I'd like to understand the issue. Sometimes, for me anyway, it's because of the settings of paragraph where you want to place the image. I verify that the line spacing is Single and that the font size is consistent. Also, sometimes the placement properties affect it; that is, if t...

How do insert page numbers (after page 1) in Excel?
I am attaching a Excel worksheet to a Word doc. I want my pages to continue from the Word doc. How can I accomplish this? Thanks, ...

Accessing controls on a property page
All, I have a SDI app with a formview. The formview has a property page on it. I am trying to I access controls on the property page from a menu item. How can I do this? Thanks in advance... ...

Image linked to table
I have a dbase that I developed a few years ago using Access 2003. I have a form that brings together a variety of information about a student based on a query using several tables. One of the tables is the tblImages. The link is the student ID. I have a folder in the same directory that contains images of the students. In the database, I have a table called tblImages. The fields in the table are Student ID and a link to the image in the external directory. I right click on the field and select import object then click the link box and locate the image. I used to be able ...

Pivot Table
Greetings I have a pivot table with dates as the headings, but the dates are grouped into month and year. My data is financial year july 03-june 04 and I would like to select "Show items with no data" from the month field, but this displays january to June 03 which I don't want to see because it is not in the 03/04 year. How can I display all months in the 03/04 financial year only (and not display jan-jun 03 or jul-dec 04) thanks in advance. Dan ...

Insert multiple rows
Hi, is there a way to insert multiple rows (that conatin certain column values) for each existing row in a worksheet? Thanks. -- Michael Hi Michael, See insert rows maintainining formulas http://www.mvps.org/dmcritchie/excel/insrtrow.htm it is set up to retain formulas and clear constants, but you can modify which columns get cleared so you can maintain some of the constants. ---- HTH, David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001] My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm Search Page: http://www.mvps.org/dmcritchie/excel/search.htm ...

Purchase Invoice Matching Table
Hi Im looking to build a report in smartlist builder that shows me shipment line items with purchase invoice detail if they have been matched. I cant find the table/field that links shipments and invoices - can anyone help? Regards Martin You can use POP30310 (with PO#) or POP30300 -- Microsoft Dynamics GP MVP http://ddelprado.blogspot.com "Martin P" wrote: > Hi > > Im looking to build a report in smartlist builder that shows me shipment > line items with purchase invoice detail if they have been matched. > > I cant find the table/field that links ship...

Is there a way to insert footnotes in Excel?
I need to know if there is a way to add footnotes to an Excel spreadsheet? My guess is thatr there is not. Thanks. Hi your guess is correct. you could insert a comment ('Insert - Comment') -- Regards Frank Kabel Frankfurt, Germany "Knocka" <Knocka@discussions.microsoft.com> schrieb im Newsbeitrag news:C1E1D6C1-AD5E-4AEE-8F16-2234B82A88DD@microsoft.com... > I need to know if there is a way to add footnotes to an Excel spreadsheet? > My guess is thatr there is not. Thanks. You could add a footer line in a printed worksheet to include you footnotes. This w...

Report with relational tables?
Hi Everyone, I'm here a couple times a year and I always have to relearn when I start a new project. This one is much harder than I've done before. Here is what I am doing. I am exporting data from our school software system to create a form that parents will fill out to re-enroll their children in our school. I have made 4 tables. The primary one is for student information. I am using a student id as the primary key. I made a second table with parent information, again using student id to relate them, but not as the primary key. Many students have up to 4 parents, so the...

Can I use a 'lookup' to a Pivot Table?
I am attempting to compare one column of data (a list Employee numbers) to another (on a different sheet in the same workbook, also of Ee #s but not as complete) and put the number in the corresponding cell back to the original spreadsheet. Since the lists aren't exact, I can't simply do an (='other sheet'!A1)and drag it down. The lists are both formated as numbers and in numerical order but not the same length. The oddity is that the sheet I'm referencing to is a Pivot Table. I'm getting a #N/A message. Thanks in advance You could use the GETPIVOTDATA function: ...

pivot table
After refreshing data, three columns of data are missing. I have to dag the field to the table again. Does anyone know what's wrong? i'm using excel 2003. thanks/jj Please check the column header , if any change in header it is missing from pivot after refreshing. Sanjeev "JJ" wrote: > After refreshing data, three columns of data are missing. I have to dag the > field to the table again. Does anyone know what's wrong? i'm using excel > 2003. > > thanks/jj ...

Unable to read file #10
I have created a small application in XL with VBA. Inadvertantly I must have changed the file extension. I now try to open the file and get the message "Unable to read file". Can someone help me get around this as a lot of work has gone into this particular project. Can i write some VBA code to get behind the scenes and open the file. Many thanks. Does this happen on just this one file? If yes, do you have a backup? Sometimes excel workbooks get corrupted. One cause is opening them from a floppy and saving to that floppy. (Instead you should use windows explorer to cop...

appending data to ms access table using ms excel
Help, I am trying to update an Access table that has one field with a value that is coming from an Excel table. I looked through several cites are I have been unsuccessful. I believe that ADO would be needed to accomplish the task. If anyone has a short example of the code that would be needed in Excel to control access please let me know. Thanks in advance Here's a routine that I use to append daily stock price information to the MDB file where I keep historical quotes. I have a generic function that sets up the connection, rather than doing that in the sub itself. Prices() is...

Pivot table and defect tracking
Hello, I have a list of defect numbers, entered dates, and closed dates (approximately 6000 rows). All defects have entered dates, many, (but not all) have closed dates. I see how to do a pivot table to produce defects entered by week and I can change the pivot table to show defects closed per week. I don't see how to show all weeks and display defects entered and closed for each week. Any suggestions appreciated, Thanks bmac ...

Hyperlinks or something
I have 2 sheets (sheet one and Sheet two) On sheet ONE in col A I have a number of entries I want to be able to click on any one entry in sheet ONE and be taken to a brief explanation on Sheet TWO. Once on sheet TWO I would like to return to the starting point on Sheet ONE Ex: I cliick on A12 in Sheet ONE, that would take me to Sheet TWO a50 Once I have read the explantion on sheet TWO I would click on A50 in sheets TWO and return to sheet ONE a12 One complication is that the entries on sheet ONE will not ALWAY be in the same location due to a sorting process. I would appreciate any he...

Create field from table with no join
I have a table that holds a master census date. I need to add this census date to be generated in a field in another query, but obviously cannot provide any linkage. Short of hard-coding this date (which changes every week) I cannot get the date to be generated within the query, HELP! Ta On Mon, 11 Feb 2008 08:01:03 -0800, Andy <Andy@discussions.microsoft.com> wrote: >I have a table that holds a master census date. I need to add this census >date to be generated in a field in another query, but obviously cannot >provide any linkage. Short of hard-coding this date (which...

How do I keep the position of tables in the Diagram Pane
After saving my queries or relationship diagram, next time I open it , it is mixed up. -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/200706/1 Access should retain the position of the tables in the relationship window. Make sure you save before you exit the window. It may also help to turn off Name AutoCorrect: http://allenbrowne.com/bug-03.html If you rename the tables, they may not hold position. Some combinations of Access versions + Windows versions will mess up the location of a table in the window if you are scrolled down ...

pivot tables?
Each person in my database (of over 1000) has two rows of information. I want to combine two cells for each person so that there's just one entry per person. Someone suggested a pivot table but I don't know how to do that! -- Message posted via OfficeKB.com http://www.officekb.com/Uwe/Forums.aspx/ms-excel/200508/1 By combine two cells, I mean mathematically add values of two cells. Patty wrote: >Each person in my database (of over 1000) has two rows of information. I want >to combine two cells for each person so that there's just one entry per >person. Someone suggest...

Extract hyperlink from "address"
Hi I have a spreadsheet with a large number of hyperlinks which the "Text to display" has been set to "Click here to view", what I need o do to save hours of re-typing is to copy the target address from the "Address" box on the hyperlink wizard to a new cell. I'm using Excel 2007. Thanks in advance SteveB On Tue, 16 Jun 2009 19:07:02 +0100, "Steve" <steveB@nowhere.com> wrote: >Hi > >I have a spreadsheet with a large number of hyperlinks which the "Text to >display" has been set to "Click here to view"...

Can't insert Rows?
When I try and insert a row I get a prompt saying "To prevent possible loss of data, Excel cannot shift non-blank cells off the worksheet. Try to locate the last non-blank cell by pressing CTRL+END and delete or clear all cells in between the last cell and the end of your data. Then select cell A1 and save your workbook to reset the last cell used." Can anyone advise (a) Why this happens and (b) How to stop it happening as I've tried doing what the prompt says and can't seem to solve it...and I really need to insert a row, rather than cut & paste. Any help great...

Search for lowercase followed by uppercase and insert paragraph
Hi, I have text in a spreadsheet imported from another application. Line breaks have been removed so I have text like the following in cells "lowercaseUppercase". Is there any way to find each occurrence of the transition from lower to uppercase and insert a paragraph so the uppercase text begins on a new line? This could be a vba macro is it can't be done using standard commands. On Wed, 2 Dec 2009 13:18:02 -0800, jgwors <jgwors@discussions.microsoft.com> wrote: >Hi, >I have text in a spreadsheet imported from another application. Line breaks >...

?Examples to create new .mdb file and its tables from code (and more)
Can anyone direct me to an example code page which will help me do the following: After getting a path and filename from the user, I want to create a new .mdb file, create tables in the new file without leaving the .mdb file I am in, then link to the tables so I can populate them. Also, a different question but very closely related, in my various and sundry books on programming Access I have never seen a way programmatically to create a lookup field in a table. Does anyone have a how-to on that question as well? Thanks. - Paul Schrum In news:1187926977.681614.150800@x40g2000prg.googlegr...

Outlook deleting my read emails
Once I've double clicked and fully opened then read my emails, then close the window, Outlook is deleting my read message, and it's now appearing in the deleted folder. Anybody have any ideas? ...