Function ReturnNextID(tbl, strFieldName) 'tbl = tblName/layerName Dim intMax Dim ds Dim query Dim qRows Set ds = Map.Layers("CityTrees").DataSource 'Assuming layerName = CityTrees query = "SELECT max(" & strFieldName & ") FROM " & tbl Set qRows = ds.execute(query) 'Execute Query qrows.movefirst 'Read results intMax = qRows.fields(1).value ReturnNextID = intMax + 1 End Function
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.