Hi guys,
I have designed a template to capture field data.
I want to enter point data - fill in all the relevant fields on page 1, then fill in more specific data about the object on page 2.
The next point object I enter will have the same attributes on Page 1 but different attributes on page 2.
Is there a script or code I can add to my .apl file that makes my data entry behave like that?
I don't want to re-enter data which won't change in my data collection.
Thanks
Solved! Go to Solution.
Hi Benjamin, sorry I don't have time to look at this in detail right now...but from my first post I show how to use the defaultvalue to populate a field with the saved global variable....maybe that can help get you over a hurdle. ![]()
e.g.
defaultvalue="Application.UserProperties("strMyVariable")"
Rebecca that was helpful, Thankyou.
My next hurdle though is getting the field to autopopulate only when a check box is selected in my form. So would I then be able to nest the pressing_ok() sub routine inside an if statement to make it run with the selection of my check box, and the else would run if it was not checked and change my global variable to a blank string: "" ??
Thanks a bunch!
You can't nest a subroutine in an if/then statement. You can only put an if/then in a subroutine.
If it were me, I would do a toggle of sorts. For example, using a button (I don't work with check boxes all that often, so my example uses a button), when the button is clicked, it toggles a variable between 1 and 0 and depending on which it is toggled to, is which set of code it runs.
Example using Non-Global variables and a button:
SubFormInit
Dim Toggle
Toggle = 0
End Sub
Sub ToggleBtn
if Toggle = 0 then
Toggle = 1
'and now Run this code
End If
If Toggle = 1 then
Toggle = 0
'and now Run this code
End if
End Sub