I am looking to figure out how to autofill a custom form at the click of a button. Basically i have a toolbar where if I click the button and a point on the map a form pops up and gives me a bunch of options. To make it easier I am looking to have a few pre-made forms so if i click on lets say a corn icon on the toolbar and then click on the map, The form would pop up with all the corn details already filled on the form so you just need to hit OK and it places the point.
Solved! Go to Solution.
I ended up figuring it out. i got the buttons added to the form making it much easier. Here is a link to where I posted the answer. vbscript - Adding button to Arcpad form - Geographic Information Systems Stack Exchange
Sub InsertCorn
Dim objForm
Set objForm = Applet.Forms("EDITFORM")
Dim objPage
Set objPage = objForm.Pages("PAGE1")
Dim objButton
Set objButton = objPage.Controls("AddCorn")
ThisEvent.Object.Controls("cboAGRLU_ClassGRP").value = "Cereal"
ThisEvent.Object.Controls("cboCropType_Varietal").value = "Corn"
'etc etc
End Sub
I am trying to add in a button on the arcpad form. that sets the values to Cereal and Corn. This is all i have gotten so far and im stuck. Anyhelp would be appreciated.
I think it might be easier to just have multiple forms in your .apa. When you click on the 'corn' button, the frmCorn pops up, and when you click on the 'cereal' button, the frmCereal pops up. You could incorporate all the default values into each form.
I ended up figuring it out. i got the buttons added to the form making it much easier. Here is a link to where I posted the answer. vbscript - Adding button to Arcpad form - Geographic Information Systems Stack Exchange
I was just hopping on this morning to see if I can could help out on this since I just got done working on my current project that is a little bit similar. Great job on getting it figured out on your own! I went a completely different route with buttons on the toolbar like you originally were looking at doing and mine doesn't even have a form that opens up. You just pressed the button and it automatically marks the map and fills in the data without skipping a beat and opening the form. Unfortunately, I ran into a weird glitch that won't place the data into the fields until some other event happens afterwards, such as placing another dot, or even just selecting the dot that was just created. I have a clunky workaround for now, but it is working. I also am running an older version of ArcPad 10 (due to use of a 3rd Party company program used to merge the data to back into my database can't support the newer versions at this time, so that glitch may be fixed already, I just don't know about it. But anyway, good work on figuring out what you were looking for on your on your own.
I also see that you have two questions still open about the same subject. You may want to close those up with your findings and get rid of those posts altogether so people can find what you discovery and announcement easier. I have the following links: