POST
|
Hi, I have created a personal geodatabase in ArcGIS, which includes 1 feature layer only and a number of database tables. When I use the GetDataForArcPad tool, it allows me to export the feature layer only, and not the whole geodatabase. It doesn't create an AXF file. I created the geodatabase in ArcCatalogue, and imported the feature layer and the table files as per instructions. I originally created these dbf tables in Excel and saved them as dbf4 files. When I created the database in Arccatalogue, the Access database was created as it was supposed to and I have related one of the associated tables to the main table. I'm at a loss as to what the problem is. I have also had a look at the riverside example, but I don't want to use an SDE geodatabase, rather a personal one. Can anyone help?
... View more
06-16-2011
11:52 PM
|
0
|
5
|
2510
|
POST
|
Hello, I am trying to replicate the "Riverside" sample that comes with the ArcPad application. I ran it on my desktop and it has the functionality that I need for a project I'm working on. I am having problems though, in setting up a geodatabase with related tables, that can then be checked out to arcpad with associated MDB,AXF, Access database files, etc. I have worked out how to use the GetDataForArcpad tool to create a project for ArcPad, but when I do, I only get the ArcPad Map file,shapefiles, APL, DBF and VBS files. Does anyone know of a example that works through the process of creating a personal geodatabase with SQL references and AXF file creation, to checking it out to ArcPad?? I'm not really a programmer, but would dearly love some help.
... View more
06-14-2011
09:43 PM
|
0
|
1
|
2804
|
POST
|
Hello all, Is it possible to change the order of pages in an arcpad editform once you have created it? Charles
... View more
05-11-2011
05:26 PM
|
0
|
1
|
367
|
POST
|
Hi, I have an ArcPad Editform associated with a shapefile. I want to be able to import the GPS locations (points) into my shapefile and go to each pre-defined point and collect data using my Editform. I can't figure out how to do this. Can anyone help?
... View more
04-26-2011
05:08 PM
|
0
|
1
|
496
|
POST
|
Hi, I am developing an ArcPad form associated with a shapefile (apl file) to edit records from a database file. I want to be able to scroll forwards and backwards through the records in the database file and have the values from 2 fields from each record, "GENUS" and "SPECIES", populate two field on the Editform called "Genus" and "Species". I obtained and modified some code from an earlier thread which enables you to scroll forwards or backwards through records, displaying the record fileds in a messagebox. My question is: How can I modify the code below to have the values diplayed in the relevant fields on the Editform, rather than in a messagebox? This would then allow me to edit the values and then save the new values back to the database file. If possible, I would also like to be able to generate a new record in the database file using a button on the same editform. At the moment I have this capacity on another form, but would like to have it on the same form as the edits. The "Genus" and "Species" controls on the editform are comboboxes, the "Species" menu being dependant on what is selected from the "Genus" menu. The script for the 2 subs to scroll forwards and backwards is shown below. Sub MyScriptForwards 'Scrolls forwards through records in dbf file "FloristicsOut.dbf". 'Called from the Onclick event on a "scroll forward" button on the editform Dim objDBF, strGenus, strSpecies, i Set objDBF = Application.CreateAppObject("recordset") objDBF.Open "P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\Output Files\FloristicsOut.dbf", 1 objDBF.MoveFirst For i = 0 to objDBF.RecordCount - 1 strGenus = objDBF.Fields("GENUS").Value strSpecies = objDBF.Fields("SPECIES").Value msgbox ("Genus: " & strGenus & vbnewline & "Species: " & strSpecies) objDBF.MoveNext Next objDBF.Close Set objDBF = Nothing End Sub Sub MyScriptBackwards 'Scrolls backwards through records in dbf file "FloristicsOut.dbf". 'Called from the Onclick event on a "scroll backwards" button on the editform Dim objDBF, strGenus, strSpecies, i Set objDBF = Application.CreateAppObject("recordset") objDBF.Open "P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\Output Files\FloristicsOut.dbf", 1 objDBF.MoveLast For i = 0 to objDBF.RecordCount - 1 strGenus = objDBF.Fields("GENUS").Value strSpecies = objDBF.Fields("SPECIES").Value msgbox ("Genus: " & strGenus & vbnewline & "Species: " & strSpecies) objDBF.MovePrevious Next objDBF.Close Set objDBF = Nothing End Sub I'm not very good at VB scripting so any pointers would be gratefully received!
... View more
03-31-2011
03:57 PM
|
0
|
0
|
464
|
POST
|
kpaul, could you send me the complete code please, ie where you say "......rest of controls" and "....all the other same lines for setting field values" Thanks for your help. Further to this, can you give me a bit more information about how your form looks and operates on the handheld device. I'm sure that it is similar to what I am trying to do, it's just that I'm struggling to understand some of the functionality - being fairly new at VB scripting
... View more
03-13-2011
08:21 PM
|
0
|
0
|
409
|
POST
|
kpaul, could you send me the complete code please, ie where you say "......rest of controls" and "....all the other same lines for setting field values" Thanks for your help
... View more
03-10-2011
07:28 PM
|
0
|
0
|
409
|
POST
|
Great - that worked! Thanks Rui, and thanks Jeff for the additional script
... View more
02-27-2011
03:36 PM
|
0
|
0
|
870
|
POST
|
Hi GE, Tried that, but got following error message : "Microsoft VBScript runtime error Object Required: ObjControl.Field [Line: 299, Col: 2] Source Text Unavailable"
... View more
02-23-2011
11:53 AM
|
0
|
0
|
870
|
POST
|
Hi Jeff, that's really helpful as I'm trying to do something similar. I want to add the contents of a number of fields and autopopulate a "Tally" field with the sum of these fields. I used your code, but when I substituted "+" for "-" it doesn't work. eg. If I enter "100" for the well depth and "20" for the GW depth, the water column thickness field is autopopulated with "10020". I'm not sure what he problem is - it appears to be adding the text string rather than the numerical values. The code (called from the Onchange event in the GW depth field) I used was: Sub SumFunction Set objControl= ThisEvent.Object Set objPage= ThisEvent.Object.Parent GWDepth= objControl.Value WaterColumnThickness= objPage.Controls("TxtWell_Dep_TOC").Value + GWDepth objPage.Controls("TxtWat_Column").Value= WaterColumnThickness End Sub Any ideas?
... View more
02-22-2011
05:21 PM
|
0
|
0
|
870
|
POST
|
Hi, I'm working on a vegetation form which allows the user to enter records of plant species, with multiple species (entries) per site. The data is stored in a dbf file. I allow the user to select plant names from combobox lists. Because the list is very large, I have a combobox for Genus, which when selected, calls a dependant list (via a Function) of species within that genus. Genus and species appear in separate fields on the form. There is also a unique code number (an integer) that represents each plant species (ie Genus and species form the full plant name). What I would like to do is to be able to get the unique code number to be show in another field on the form apon selection of the species in teh dependant list. My code, which is called from the OnSelChange event in the Genus combobox on my form is: Function UpdateCombo2(cmb1value) 'This function is for a dependant list for species, once genus has been selected Dim combo2, instPath, DispName 'on Error Resume Next instPath="P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\" Set combo2 = layer.Forms("FrmNewSpecies").Pages("PgNewSpp2").Controls("CboSpecies") combo2.Clear combo2.AddItemsFromTable instPath & "Species_Dependant.DBF", "SP_TEXT", "SP_VALUE", "[GEN_VALUE] =""" & cmb1value & """" If err.Number <> 0 Then 'Msgbox "You forgot to edit the DependComboApplet.vbs file and change the value of instPath!!!" 'err.Clear end if End Function I'm assuming that I need another field in the source file for the dependant list (which is called "Species_Dependant.DBF") which contains the unique codes for the Genus/Species name, which can somehow be used to populate a code field in my form. Can anyone help with this?
... View more
02-03-2011
03:10 PM
|
0
|
2
|
2983
|
POST
|
Hello Jay, I'm trying to do a similar thing. I have figured out how to add records to a dbf file from ArcPad, but I can't figure out how to scroll through records in the dbf and edit a particular records. Can you give me a bit more background on how you did yours? Any help from Jay or others out there gratefully received. Charles
... View more
02-03-2011
01:12 PM
|
0
|
0
|
409
|
POST
|
Dennis, I figured out how to solve this. I simply changed the format of the CODE field in the dbf file from number to text. All working now. Thanks again for your help.
... View more
01-26-2011
07:06 PM
|
0
|
0
|
505
|
POST
|
Hi Dennis, thanks very much for your help. I'm also a novice and am learning as I go. Your instructions worked ! Interestingly, my code field contains integers. When I selected from the Code combo box, it autofilled the comon and scientific name values with no problem, however if I selected from either the common or scientific combo boxes, it left the Code field blank. I then changed the integers to text to see what would happen, and it worked perfectly. I'm wondering now how to change the code to allow integers to be used. Charles
... View more
01-26-2011
06:22 PM
|
0
|
0
|
505
|
POST
|
Dennis & Rolf, I am trying to do a similar thing to what you have shown in this demo - which has been very useul thanks. However I still can't get it to work properly. I have 3 comboboxes for: a code, a common name and a scientific name (binomial). If I select a code number from the code combobox, it successfully updates the other 2 comboboxes - so far, so good. However if I try to select a common name from the common name combobox, I get an error ""cboCallingCBO.ListIndex [Line 758, Col 2] Source text unavailable." A similar thing happens when I attempt to select a scientific name from that combobox. It seem that somehow it's not recognising the Calling combobox, or that I haven't set the parameters properly. The way I call the function is using the onselchange event for the combobox. For example, in the combobox I have for the code it is: Call UpdateField("cboSppCode", "cboCommName", "cboSciName", "CODE", "COMMON_NAM", "LATIN_NAME") I'm not sure if I should be using all these parameters The code I'm using is as follows: 'Function receives string values which must be valid cbo names for page controls. Sub UpdateFields(strCallingCBO, strControl1, strControl2, strKeyField, dbfField1, dbfField2) Dim objPage, rsTrees, cboCallingCBO, cboControl1, cboControl2, txtUpd1, txtUpd2, txtCallValue, BookMark 'Set the environmental parameters Set objPage = Layers("Veg16_Main.shp").Forms("EDITFORM").Pages("Triple") Set cboCallingCBO = objPage.Controls(strCallingCBO) Set cboControl1 = objPage.Controls(strControl1) Set cboControl2 = objPage.Controls(strControl2) 'Assign the calling cbo value to a variable: txtCallValue txtCallValue = cboCallingCBO.Value 'Open the DBF file in read only. Set rsTrees = Application.CreateAppObject("RecordSet") Call rsTrees.Open("P:\Work\SSD\Users\Huxtac\ArcPad Stuff\Veg_16\Triple.dbf",1) 'Mobile Version has the DBF in a different location, uncomment before final use. 'rsTrees.Open ("C:\Documents and Settings\My Documents\DataForArcPad\TreeName.DBF",1) 'Search the recordset for the other values 'BookMark = rsTrees.Find(" =""" & txtCallValue & """") BookMark = rsTrees.Find("[" & strKeyField & "]=""" & txtCallValue & """") 'Now Capture the other two field values if there is a valid match for the selected value If BookMark = 0 Then MsgBox "Value Not Found in Database!",vbExclamation,"No Code Found" 'Reset all combo boxes to default value Set cboCallingCBO.ListIndex = -1 Set cboControl1.ListIndex = -1 Set cboControl2.ListIndex = -1 Exit Sub Else txtUpd1 = rsTrees.Fields(dbfField1).Value txtUpd2 = rsTrees.Fields(dbfField2).Value 'Now change the other two combo boxes. Call intSetCBXText(cboControl1, txtUpd1) Call intSetCBXText(cboControl2, txtUpd2) End If End Sub 'Function to Set ComboBox ListIndex values to the matching text Function intSetCBXText(ByRef pCBX, pText) For intSetCBXText = 0 To pCBX.ListCount-1 pCBX.ListIndex = intSetCBXText If CStr(pCBX.Text) = pText Then Exit For End If Next 'If the text was not found, make nothing selected in combobox If CStr(pCBX.Text) <> pText Then pCBX.ListIndex = -1 intSetCBXText = -1 End If End Function
... View more
01-26-2011
04:03 PM
|
0
|
0
|
505
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|