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
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.