pEnumVar = pData.UniqueValues value = pEnumVar.MoveNext For i = 0 To pData.UniqueValueCount - 1 ComboBox1.Items.Add(CStr(pEnumVar.Current)) '<--- this should add the values to your cmbLot Control value = pEnumVar.MoveNext Next
pEnum = pDataStats.UniqueValues pEnum.Reset() Do While pEnum.MoveNext ComboBox1.Items.Add(pEnum.Current) Loop
Dim pTable As ITable Set pTable = pFeatureClass 'Set a table object to the desired feature class 'I like to sort the rows before listing them 'The following section accomplishes this Dim pTableSort As ITableSort Set pTableSort = New TableSort 'Instantiate a new table sort With pTableSort .Fields = strField 'Set the field to sort to the desired field .Ascending(strField) = True 'Sort assending (smallest to largest) Set .table = pTable 'Pass the table to sort End With pTableSort.Sort Nothing 'Sort the table/field Dim pCatchCursor As ICursor Set pCatchCursor = pTableSort.Rows 'Pass the sorted field's rows to a cursor Dim pRow As IRow Set pRow = pCatchCursor.NextRow 'Use the next method to access the first row frmMain.cboAtt.Clear 'Clear the combobox Dim j As Integer 'j is a counter variable 'This loop goes through each row and adds the value to the combobox For j = 0 To pTable.RowCount(Nothing) - 1 frmMain.cboAtt.AddItem pRow.Value(4) '4 is the index of my desired field Set pRow = pCatchCursor.NextRow 'Load the next row Next
Hi,
I am trying to loop through the field names and get field values when a feature is identified.
Is there a way to programamtically loop through the field names from an identify wdialog and popultae the field values in a word document.
I created a doc template with few bookmarks, so that I can popultae these field values to the bookmark in Word doc.
Please help me.