Option Explicit Sub ShowForm() '=========================================== 'Show the form Layer.Forms("EDITFORM").Show End Sub '===================================== Sub btnAdd_onClick() 'Code when clicking the "Add" button 'Will take a listbox selection value and add this to a textbox value '===================================== 'Dimension the form, page, texfield and listbox Dim objForm, objPage, strText, pListbox Set objForm = Layer.Forms("EDITFORM") Set objPage = objForm.Pages("[PAGE NAME]") Set pListBox = objPage.controls("[LISTBOX NAME]") 'Get existing value of textfield. strText = objPage.Controls("[TEXT FIELD NAME]").Value 'Update the text field with the text value form the listbox. 'Using a comma delimiter If strText = "" then strText = pListBox.Value Else strText = strText & ", " & pListBox.Value End If objPage.Controls("[TEXT FIELD NAME]").Value = strText 'Clean up Set objForm = Nothing Set objPage = Nothing End Sub
Sorry, I'm a VERY basic coder. Can you expand a little more? I understand what you are getting at, but don't know how to set it up.Thanks.
Is it possible to do a listbox in ArcPad (7.1.1) that allows for multiple selections? Or even pick one, hit "add" button, pick another, hit "add" button, etc.? Ideally these would all be concatenated (separated by comma) in a big text field in a geodatabase when checked in.Possible?
Los miembros registrados pueden publicar, seguir actualizaciones y más. ¿Nuevo aquí? Regístrate gratis.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.