Zeroanarchy
Technical User
'setup mdb connection the file name is weedmanager.cdb
the field name on the form is soil and the field in the cdb file is called soiltype, soil field can be found on page1.
Umm basiclly this is an app on a Handheld everything works well but what I am trying to do is, the onclick of ok calls
Sub viper_weed I need it to export the soil type to the database backend.
Anyone got any experience with this.
Thanks ZeroAnarchy
Option Explicit
Sub UpdateFormFromShape
Dim objSelLayer, objRS, objSH, lngSHType,objPage
'Get the coordinates of the selected feature
Set objSelLayer = Map.SelectionLayer
Set objRS = objSelLayer.Records
objRS.Bookmark = Application.Map.SelectionBookmark
Set objSH = objRS.Fields.Shape
'msgbox Cstr(objSH.x)
Set objPage = Layer.Forms("EDITFORM"
.Pages("page1"![Wink ;) ;)](data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7)
objPage.Controls("tbx_east"
.Value = objSH.x
objPage.Controls("tbx_north"
.Value = objSH.y
Set objPage = Nothing
End Sub
Sub viper_weed ' optional parameters - (x,y)
msgbox "called routine"
'setup mdb connection
'get page control values
'east = application.map.layers("viper_weed.shp"
.forms("EDITFORM"
.Pages("Page1"
.controls(tbx_east"
.value
'do the rest of the controls
End Sub
the field name on the form is soil and the field in the cdb file is called soiltype, soil field can be found on page1.
Umm basiclly this is an app on a Handheld everything works well but what I am trying to do is, the onclick of ok calls
Sub viper_weed I need it to export the soil type to the database backend.
Anyone got any experience with this.
Thanks ZeroAnarchy
Option Explicit
Sub UpdateFormFromShape
Dim objSelLayer, objRS, objSH, lngSHType,objPage
'Get the coordinates of the selected feature
Set objSelLayer = Map.SelectionLayer
Set objRS = objSelLayer.Records
objRS.Bookmark = Application.Map.SelectionBookmark
Set objSH = objRS.Fields.Shape
'msgbox Cstr(objSH.x)
Set objPage = Layer.Forms("EDITFORM"
objPage.Controls("tbx_east"
objPage.Controls("tbx_north"
Set objPage = Nothing
End Sub
Sub viper_weed ' optional parameters - (x,y)
msgbox "called routine"
'setup mdb connection
'get page control values
'east = application.map.layers("viper_weed.shp"
'do the rest of the controls
End Sub