<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Populate and Link 3 Combo boxes from a single DFB in ArcPad Questions</title>
    <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186642#M1328</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to empliment this for my tree inventory as well.&amp;nbsp; I am TOTALLY new to coding, and so am now the reigning novice of this thread. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems I have missed something in the translation, or am just slow, but I keep getting errors. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not seen in the codes that have been posted where exactly the differentiation is made for each combobox.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Call UpdateFields &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ("cboBOTNAME", "cboCOMMON", "cboCODE", "BOTNAME", "COMMONNAME", "SP_CODE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;come at the beginning of the code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or is it what replaces the:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub UpdateFields(strCallingCBO, strControl1, strControl2, strKeyField, dbfField1, dbfField2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And if so, is that the only other place where the code is changed (other than at the "Set objpage" and .DBF location lines)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sure that this is more simple than I am making it, but I have managed to thouroughly confuse myself. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any assistance would be great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Patrick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Feb 2011 20:44:15 GMT</pubDate>
    <dc:creator>KyleSato</dc:creator>
    <dc:date>2011-02-22T20:44:15Z</dc:date>
    <item>
      <title>Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186634#M1320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I have seen many posts on topics related to this - but nothing that quite covers my problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a single DBF with 3 fields (SppCode, SppComm, SppSci) I have 3 combo boxes on a custom ArcPad form for field workers to choose names from. We anticipate that some field workers will know the Latin binomial name (held in SppSci) but others may only know the common name (SppComm). To make it easier for them I want to link the 3 combo boxes so that when any one of the combo boxes is used an OnSelChange event will change the other 2 boxes to the matching fields for the selected record.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My initial approach was to get the ListIndex value from the active combo box and then set the other two combo boxes ListIndex attribute to the same value. This worked well until I turned on the sort function and the ListIndex became meaningless as an index between fields.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Should I add an extra field in the DBF as a unique index and try to use this to make selections? or is the .bookmark property for recordset objects capable of doing what I want?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is greatly appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dennis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 01:56:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186634#M1320</guid>
      <dc:creator>DennisPomo</dc:creator>
      <dc:date>2011-01-05T01:56:58Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186635#M1321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can keep your sorted lists but you have to use code to set the correct value in the combobox. This will require that you loop through the items in the combobox to find the correct one.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You can search on the text item or value item using one of the functions below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Rolf&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;''=================================================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' ---------- Function intSetCBXValue(ByRef pCBX, pValue) ----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' Generic function to set a combo box's listindex based on the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' value attribute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' Parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' pCBX (a combobox)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' pValue (the value to find in the combobox)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' Returns: the listindex or -1 if no match was found&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''=================================================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Function intSetCBXValue(ByRef pCBX, pValue)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; For intSetCBXValue = 0 To pCBX.ListCount-1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pCBX.ListIndex = intSetCBXValue&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If CStr(pCBX.Value) = CStr(pValue) Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit For&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ' If the value was not found, make nothing selected in combobox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; If CStr(pCBX.Value) &amp;lt;&amp;gt; CStr(pValue) Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pCBX.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; intSetCBXValue = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;''=================================================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' ---------- Function intSetCBXText(ByRef pCBX, pText) ----------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' Generic function to set a combo box's listindex based on the&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' text attribute.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' Parameters:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' pCBX (a combobox)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' pValue (the value to find in the combobox)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'' Returns: the listindex or -1 if no match was found&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;''=================================================================&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Function intSetCBXText(ByRef pCBX, pText)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; For intSetCBXText = 0 To pCBX.ListCount-1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pCBX.ListIndex = intSetCBXText&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If CStr(pCBX.Text) = pText Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Exit For&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ' If the text was not found, make nothing selected in combobox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; If CStr(pCBX.Text) &amp;lt;&amp;gt; pText Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pCBX.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; intSetCBXText = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 06:48:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186635#M1321</guid>
      <dc:creator>RolfBroch</dc:creator>
      <dc:date>2011-01-05T06:48:32Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DBF</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186636#M1322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for the help Rolf.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I used your code snippets and a some other pieces on the forum to solve this problem. As a complete beginner I really appreciate the help, thanks very much. I have seen so many people looking to do similar things that I will paste the code below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This function takes the name of the calling combo box, the names of the other two combo boxes you wish to change. It also takes the field names used in the DBF, first the key or lookup field (depending on the calling combo box) and the other two fields we want to look up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The function is called using the onselchange event for the combobox and the parameters sent depend on the calling combobox e.g: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Call UpdateFields("cboSppCode", "cboCommName", "cboSciName", "CODE", "COMMON_NAM", "LATIN_NAME")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My DBF has 3 fields: CODE: Unique code for each species, COMMON_NAM: Common name, LATIN_NAME: the scientific binomial for the species.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code..:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Function recieves string values which must be valid cbo names for page controls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub UpdateFields(strCallingCBO, strControl1, strControl2, strKeyField, dbfField1, dbfField2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim objPage, rsTrees, cboCallingCBO, cboControl1, cboControl2, txtUpd1, txtUpd2, txtCallValue, BookMark&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Set the environmental parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set objPage = Layers("Tree_Inventory").Forms("EDITFORM").Pages("Species")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Set cboCallingCBO = objPage.Controls(strCallingCBO)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set cboControl1 = objPage.Controls(strControl1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set cboControl2 = objPage.Controls(strControl2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Assign the calling cbo value to a variable: txtCallValue&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;txtCallValue = cboCallingCBO.Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Open the DBF file in read only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Set rsTrees = Application.CreateAppObject("RecordSet") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Call rsTrees.Open ("C:\TreeInventory\APCheckout\DataForArcPad\TreeName.DBF",1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Mobile Version has the DBF in a different location, uncomment before final use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'rsTrees.Open ("C:\Documents and Settings\My Documents\DataForArcPad\TreeName.DBF",1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Search the recordset for the other values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'BookMark = rsTrees.Find("&lt;PRE&gt;=""" &amp;amp; txtCallValue &amp;amp; """")&lt;/PRE&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BookMark = rsTrees.Find("[" &amp;amp; strKeyField &amp;amp; "]=""" &amp;amp; txtCallValue &amp;amp; """")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Now Capture the other two field values if there is a valid match for the selected value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If BookMark = 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox "Value Not Found in Database!",vbExclamation,"No Code Found"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Reset all combo boxes to default value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Set cboCallingCBO.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Set cboControl1.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Set cboControl2.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; txtUpd1 = rsTrees.Fields(dbfField1).Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; txtUpd2 = rsTrees.Fields(dbfField2).Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Now change the other two combo boxes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Call intSetCBXText(cboControl1, txtUpd1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Call intSetCBXText(cboControl2, txtUpd2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Code from Rolf&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'--------------------------------------------------------------&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'Function to Set ComboBox ListIndex values to the matching text&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Function intSetCBXText(ByRef pCBX, pText)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For intSetCBXText = 0 To pCBX.ListCount-1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pCBX.ListIndex = intSetCBXText&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If CStr(pCBX.Text) = pText Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exit For&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'If the text was not found, make nothing selected in combobox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If CStr(pCBX.Text) &amp;lt;&amp;gt; pText Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pCBX.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;intSetCBXText = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am always interested in suggestions for improvement to help me learn Arcpad 8 and up, so comments are appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dennis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 10 Jan 2011 00:12:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186636#M1322</guid>
      <dc:creator>DennisPomo</dc:creator>
      <dc:date>2011-01-10T00:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186637#M1323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dennis &amp;amp; Rolf, I am trying to do a similar thing to what you have shown in this demo - which has been very useul thanks. However I still can't get it to work properly. I have 3 comboboxes for: a code, a common name and a scientific name (binomial). If I select a code number from the code combobox, it successfully updates the other 2 comboboxes - so far, so good. However if I try to select a common name from the common name combobox, I get an error ""cboCallingCBO.ListIndex [Line 758, Col 2] Source text unavailable." A similar thing happens when I attempt to select a scientific name from that combobox. It seem that somehow it's not recognising the&amp;nbsp; Calling combobox, or that I haven't set the parameters properly. The way I call the function is using the onselchange event for the combobox. For example, in the combobox I have for the code it is: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Call UpdateField("cboSppCode", "cboCommName", "cboSciName", "CODE", "COMMON_NAM", "LATIN_NAME")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm not sure if I should be using all these parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The code I'm using is as follows:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Function receives string values which must be valid cbo names for page controls.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub UpdateFields(strCallingCBO, strControl1, strControl2, strKeyField, dbfField1, dbfField2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Dim objPage, rsTrees, cboCallingCBO, cboControl1, cboControl2, txtUpd1, txtUpd2, txtCallValue, BookMark&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Set the environmental parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set objPage = Layers("Veg16_Main.shp").Forms("EDITFORM").Pages("Triple")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; Set cboCallingCBO = objPage.Controls(strCallingCBO)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set cboControl1 = objPage.Controls(strControl1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set cboControl2 = objPage.Controls(strControl2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Assign the calling cbo value to a variable: txtCallValue&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; txtCallValue = cboCallingCBO.Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Open the DBF file in read only.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set rsTrees = Application.CreateAppObject("RecordSet") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Call rsTrees.Open("P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\Triple.dbf",1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Mobile Version has the DBF in a different location, uncomment before final use.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'rsTrees.Open ("C:\Documents and Settings\My Documents\DataForArcPad\TreeName.DBF",1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Search the recordset for the other values&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'BookMark = rsTrees.Find("&lt;PRE&gt;=""" &amp;amp; txtCallValue &amp;amp; """")&lt;/PRE&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; BookMark = rsTrees.Find("[" &amp;amp; strKeyField &amp;amp; "]=""" &amp;amp; txtCallValue &amp;amp; """")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Now Capture the other two field values if there is a valid match for the selected value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; If BookMark = 0 Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; MsgBox "Value Not Found in Database!",vbExclamation,"No Code Found"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Reset all combo boxes to default value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set cboCallingCBO.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set cboControl1.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Set cboControl2.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Exit Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Else&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; txtUpd1 = rsTrees.Fields(dbfField1).Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; txtUpd2 = rsTrees.Fields(dbfField2).Value&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; 'Now change the other two combo boxes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Call intSetCBXText(cboControl1, txtUpd1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; Call intSetCBXText(cboControl2, txtUpd2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Sub&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'Function to Set ComboBox ListIndex values to the matching text&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Function intSetCBXText(ByRef pCBX, pText)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;For intSetCBXText = 0 To pCBX.ListCount-1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pCBX.ListIndex = intSetCBXText&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If CStr(pCBX.Text) = pText Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exit For&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Next&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'If the text was not found, make nothing selected in combobox&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If CStr(pCBX.Text) &amp;lt;&amp;gt; pText Then&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pCBX.ListIndex = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;intSetCBXText = -1&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End If&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;End Function&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 00:03:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186637#M1323</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2011-01-27T00:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186638#M1324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Charles,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You are learning from a beginner but I did get this to work. Hopefully Rolf will also chime in, his code snippets are very useful on these forums. Here is my suggestion:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1. UpdateField is called with the onselchange event of each combo box. The order is extremely important. For example, the first combo in my form is the Species Code (cboSppCode). the onselchange event sends the first parameter as the Index field, the known field (Unique code for this species) if you will. the sequence has to match exactly i.e. Call function(combo1, combo2, combo3, 'followed by' field for combo1, field for combo2, field for combo3).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I will copy and paste the three events below.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Be sure that the field names you pass as parameters match the field names in your DBF file. A good way to debug would be to replace the string values with the actual field names just to test.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. You may want to correct the error handling. I used "Set cboControl1.ListIndex = -1" - Remove the "Set".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;onselchange events for the 3 combo boxes:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;cboSppCode&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Call UpdateFields("cboSppCode", "cboCommName", "cboSciName", "CODE", "COMMON_NAM", "LATIN_NAME")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cboCommName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Call UpdateFields("cboCommName", "cboSciName", "cboSppCode", "COMMON_NAM", "LATIN_NAME", "CODE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;cboSciName&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Call UpdateFields("cboSciName", "cboSppCode", "cboCommName", "LATIN_NAME", "CODE", "COMMON_NAM")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 01:30:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186638#M1324</guid>
      <dc:creator>DennisPomo</dc:creator>
      <dc:date>2011-01-27T01:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186639#M1325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Dennis, thanks very much for your help. I'm also a novice and am learning as I go.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your instructions worked ! Interestingly, my code field contains integers. When I selected from the Code combo box, it autofilled the comon and scientific name values with no problem, however if I selected from either the common or scientific combo boxes, it left the Code field blank. I then changed the integers to text to see what would happen, and it worked perfectly. I'm wondering now how to change the code to allow integers to be used.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Charles&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 02:22:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186639#M1325</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2011-01-27T02:22:32Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186640#M1326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Dennis, I figured out how to solve this. I simply changed the format of the CODE field in the dbf file from number to text. All working now. Thanks again for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 03:06:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186640#M1326</guid>
      <dc:creator>CharlesHuxtable</dc:creator>
      <dc:date>2011-01-27T03:06:21Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186641#M1327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Glad to hear it is working for you.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-Dennis&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Jan 2011 23:59:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186641#M1327</guid>
      <dc:creator>DennisPomo</dc:creator>
      <dc:date>2011-01-27T23:59:10Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186642#M1328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to empliment this for my tree inventory as well.&amp;nbsp; I am TOTALLY new to coding, and so am now the reigning novice of this thread. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It seems I have missed something in the translation, or am just slow, but I keep getting errors. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have not seen in the codes that have been posted where exactly the differentiation is made for each combobox.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Does the: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; Call UpdateFields &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; ("cboBOTNAME", "cboCOMMON", "cboCODE", "BOTNAME", "COMMONNAME", "SP_CODE")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;come at the beginning of the code?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Or is it what replaces the:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sub UpdateFields(strCallingCBO, strControl1, strControl2, strKeyField, dbfField1, dbfField2)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;And if so, is that the only other place where the code is changed (other than at the "Set objpage" and .DBF location lines)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am sure that this is more simple than I am making it, but I have managed to thouroughly confuse myself. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any assistance would be great.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Patrick&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 20:44:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186642#M1328</guid>
      <dc:creator>KyleSato</dc:creator>
      <dc:date>2011-02-22T20:44:15Z</dc:date>
    </item>
    <item>
      <title>Re: Populate and Link 3 Combo boxes from a single DFB</title>
      <link>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186643#M1329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArcPad DEV newb here, looking for an easy button.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ArcPad 10.2 - Windows 10&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So In ArcPad, the Limit To List property of a Combo Box cannot be set programmatically via VB?&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;That's a downer &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Form.apl - Limit to List was set to false in all combo boxes which was triggering the Win10 virtual keyboard&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- Wasn't Ideal so I set them to true. easy peasy lemon squeezy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well... that's true for initial data entry, but there is also an option to open the form in edit mode, where the original developer is loading the text values, not the cbo's index values.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Because Limit to List is set, no values are being loaded, throwing errors (app logic dictates these values must be present).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;hundreds of fields affected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Easy button?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 May 2018 15:30:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcpad-questions/populate-and-link-3-combo-boxes-from-a-single-dfb/m-p/186643#M1329</guid>
      <dc:creator>RyanPaquette1</dc:creator>
      <dc:date>2018-05-23T15:30:29Z</dc:date>
    </item>
  </channel>
</rss>

