You are here: > ESRI Forums > arcgis desktop discussion forums > Thread Replies

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - General Concepts forum

Hotlink photos from an access database to a...   Ryan Hughes Aug 08, 2007
Re: Hotlink photos from an access database...   Andy Henry Aug 09, 2007
Re: Hotlink photos from an access database...   Michael Knight Aug 09, 2007
Re: Hotlink photos from an access database...   Ryan Hughes Aug 09, 2007
Re: Hotlink photos from an access database...   Andy Henry Aug 09, 2007
Re: Hotlink photos from an access database...   Ryan Hughes Aug 09, 2007
Re: Hotlink photos from an access database...   Andy Henry Aug 10, 2007
Re: Hotlink photos from an access database...   Ryan Hughes Aug 13, 2007
Re: Hotlink photos from an access database...   Andy Henry Aug 13, 2007
Re: Hotlink photos from an access database...   Ryan Hughes Aug 13, 2007
Re: Hotlink photos from an access database...   Ryan Hughes Sep 10, 2007
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Hotlink photos from an access database to a point feature 
Author Ryan Hughes 
Date Aug 08, 2007 
Message I am trying to hot link photos that are stored in an access database to a point. I have created a field that contains a key that would be linked to each individual photo in the database. I am having problems with the rest can some one help please? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Andy Henry 
Date Aug 09, 2007 
Message Is it a field-based or a dynamic link? Do you have ArcMap? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Michael Knight 
Date Aug 09, 2007 
Message This section from ArcGIS Desktop Help describes how to set up hyperlinks:

http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Adding_hyperlinks_to_features 
  Michael Knight
GIS Solutions Architect
Contract Land Staff, LLC
Stafford, Texas

http://www.contractlandstaff.com

 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Ryan Hughes 
Date Aug 09, 2007 
Message I got it working by change the name of the key in the database to the one that was in the attribute table...however, i had to change the field in the database back to the original name..I have an ID Key but for some reason I cannot hyperlink based off a number field...is there a way around this?
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Andy Henry 
Date Aug 09, 2007 
Message you id field is a number? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Ryan Hughes 
Date Aug 09, 2007 
Message Correct the field in my attributes table from the shapefile is an ID field which is numbers not text. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Andy Henry 
Date Aug 10, 2007 
Message Is each attribute for that field also a number? What you can do is create a new field (make it text), right click that field and select field calculator (when prompted click on yes) select your field that has the number for the id and click on ok and it will copy and paste into your new field and then see if the hyperlink works? 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Ryan Hughes 
Date Aug 13, 2007 
Message It does to access but there is an error..."saying data type mismatch in criteria expression" 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Andy Henry 
Date Aug 13, 2007 
Message When you open the access db in ArcMap does the hyperlink field look something like this #hyperlink# 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Ryan Hughes 
Date Aug 13, 2007 
Message I got it to work.... it was with the last code..."ID = '" & hyperlink.link & "'"

just delete the single qoutes and it should work.

Thanks for your help 
 
Accapp.CurrentProject.Application.DoCmd.OpenForm "Form Title", acNormal, "", "ID =  " & hyperlink.link & ""
 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Hotlink photos from an access database to a point feature 
Author Ryan Hughes 
Date Sep 10, 2007 
Message I am getting a "Cant get project error" It used to work before but now it doesnt.
 
 
Sub Hyperlink(pLink, pLayer)

  Dim pHyperlink As IHyperlink
  Set pHyperlink = pLink
  Dim pFLayer As IFeatureLayer
  Set pFLayer = pLayer
  Dim pMxDoc As IMxDocument
  Dim pContentsView As IContentsView
  Dim pHotlinkContainer As IHotlinkContainer

   'connect to the open application of Access, must be open in this case
    Dim Accapp As Access.Application
    Set Accapp = GetObject(, "Access.Application")
    AppActivate "Microsoft Access"

    On Error Resume Next
   'If frmFieldOutlines is open and active, close it.
    If (Accapp.CurrentProject.Application.Forms("FORM").Visible) Then
        Accapp.CurrentProject.Application.DoCmd.Close acForm, "FORM", acSaveNo
    End If

    Set pMxDoc = Application.Document
    Set pContentsView = pMxDoc.CurrentContentsView
    If TypeOf pContentsView.SelectedItem Is IFeatureLayer Then
      Set pHotlinkContainer = pContentsView.SelectedItem
      pHotlinkContainer.HotlinkField = "ID1"
      pHotlinkContainer.HotlinkType = esriHyperlinkTypeMacro

     'open the data form
     Dim theNum As Integer
     theNum = pHyperlink.Link
     Accapp.CurrentProject.Application.DoCmd.OpenForm "FORM", acNormal, "", "ID =  " & theNum & ""
    End If

End Sub