Sub InitPage   'Get a ref to the page   Dim pCtrl, IDField   IDField = "WEED_ID"        Set pCtrl = ThisEvent.Object.Controls     ' Increment ID number          Dim objCurrLyrRS          Set objCurrLyrRS = Layer.Records          IF pCtrl("txtID").Value = "0" then          pCtrl("txtID").Value = ReturnNextID (objCurrLyrRS, IDField)          End if  'Fill in Start Time / Date field with new Time if time hasn't been set.   Dim curdatetime                        If pCtrl("txtStartTime").Value = "" Then    curdatetime = now()    pCtrl("txtStartTime").Value = Cstr(FormatDateTime(curdatetime,3))   End If   If pCtrl("txtDate").Value = "" Then    curdatetime = now()    pCtrl("txtDate").Value = Cstr(FormatDateTime(curdatetime,2))   End If         Set pCtrl = Nothing End Sub
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.