|
POST
|
Jill, Why don't you do away with all this painful validation and simply have a date time picker control on your VBA form? Far more user friendly too. When you are in form design mode open the toolbox up right click on toolbox and select additional controls Select the Microsoft Date time picker control 6 (sp4) drag the control onto your form Duncan
... View more
03-14-2011
01:19 PM
|
0
|
0
|
462
|
|
POST
|
Hi, A "shapefile" in a Personal GeoDatabase is not called a Shapefile it is a "FeatureClass". You would normally use ArcObjects to access a FeatureClass in a Personal GeoDatabase and there are many examples in Help and on the Archived forum. But you want to access the Personal GeoDatabase using OLE, I'm guessing you are developing on a machine that does not have ArcGIS installed on it? If so then the example code below will help you. ' connect to personal geodatabase called C:\Temp\pGDB_Scratch.mdb
Dim connectionString As String = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\Temp\pGDB_Scratch.mdb"
' Create the connection.
Dim oleDbConnection As OleDb.OleDbConnection = New OleDb.OleDbConnection()
oleDbConnection.ConnectionString = connectionString
' Open the connection and create a reader.
oleDbConnection.Open()
' Create the command to select all fields from a FeatureClass called CompassPoints
Dim sqlQuery As String = "SELECT * FROM CompassPoints"
Dim oleDbCommand As OleDb.OleDbCommand = New OleDb.OleDbCommand(sqlQuery, oleDbConnection)
Dim oleDbDataReader As OleDb.OleDbDataReader = oleDbCommand.ExecuteReader()
' Display data in debug window
Do While oleDbDataReader.Read()
Debug.Print(oleDbDataReader("ID").ToString())
Debug.Print(oleDbDataReader("Angle").ToString())
Loop Duncan
... View more
03-11-2011
03:06 AM
|
0
|
0
|
838
|
|
POST
|
Allen, Good call, I've never used the MultiValue Iterator. Looks like a very useful tool. I've attached a screen shot of my model that would cycle through all the FeatureLayers in the map document clearing any selections. Duncan
... View more
03-11-2011
02:45 AM
|
0
|
0
|
1810
|
|
POST
|
Michal, I totally agree! Navigating the code gallery is like putting your head in a bucket of mud and choosing a random number! You can log your dissatisfaction here by voting on improving it. http://ideas.arcgis.com/ideaView?id=087300000008JQKAA2 Duncan
... View more
03-10-2011
07:35 AM
|
0
|
0
|
805
|