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

ArcGIS Desktop Discussion Forums

ArcGIS Desktop - ArcObjects Visual Basic for Application (VBA) forum

Linking a Microsoft Access table to a userf...   Drew Anderson Mar 15, 2006
Re: Linking a Microsoft Access table to a u...   Maynard Hansen Jun 27, 2006
Re: Linking a Microsoft Access table to a u...   Jason Fetch Jun 28, 2006
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Linking a Microsoft Access table to a userform in ArcMap 
Author Drew Anderson 
Date Mar 15, 2006 
Message I have a point shapefile and I have an Access table for each point. In the Access table the columns are years, and in the columns are hyperlinks to pictures, word documents, etc. I would like to be able to click on a point and have a userform pop up. In the userform I want to have a combo box for each column in the corresponsding access table. When I hit the drop down on the combo box I want to be able to see the list of documents, then I want to be able to click the document and have it open. How do I do this in the Visual Basic Editor in ArcMap. I would greatly appreciate any help. Thanks 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Linking a Microsoft Access table to a userform in ArcMap 
Author Maynard Hansen 
Date Jun 27, 2006 
Message Did you ever figure this out? I'd like to do something similar. 
   
Report Inappropriate Content • Top • Print • This Forum is closed for replies.    
Subject Re: Linking a Microsoft Access table to a userform in ArcMap 
Author Jason Fetch 
Date Jun 28, 2006 
Message This routine will probably take some time to write so I can't post any code, but I can offer you a structure I would follow:

1. Create a Custom UIToolControl.

2. Use an ISpaitialFilter to get an IFeatureCursor from the Shapefile. You may need to use an ITopoOperator to find the nearest feature to the point that is clicked on the map.

3. Use an IQueryFilter to get an ICursor from the Access table. You will need to set the IQueryFilter 'WhereClause' based on your Shapefiles link to the Access table. You can get this value for the IFeatureCursor in step 2.

4. Use the ICursor from the Access table to populate the combobox with the values from each record according to fields. I syntax will be something like combobox.AddItem pRow.Value(1).

5. Create a CommandButton on the form to have the selected document in the comboBox open.

I know it's not much but I hope it helps. If you have specifics questions while writing the code, please post them.