Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I'm able to get ESRI's ArcPad Login Form to assign a global variable to a field in the EDITFORM for Page1, but I actually want it to assign to a field in a related table (TABLEFORM), using an onload event.

The code below works to access the EDITFORM:

Dim pForm Set pForm = ThisEvent.Object

pForm.Pages("Page1").Controls("txtUser").Value = Application.UserProperties("LoggedInEmployee")

But I can't seem to find any documentation on how to access a related table using the same method. This forum touches on my issue, but doesn't answer it.

Any help/advice would be great.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

Finally figured it out:

The trick was to access the object controls directly on the tableform using an onload event. The first step is to create a custom form for the related table, and then click the page properties > events.... create an onload event (if applicable to your application), and enter the following lines of code:

Dim objPage, objControls

Set objPage = ThisEvent.Object
Set objControls = objPage.Controls

objPage.Controls("Combo1").Value = Application.UserProperties("LoggedInEmployee")

Note: "Combo1" is the name of the combo box I'm populating using the global variable created using ESRI's login form.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.