Hi Laura,
The current implementation of ArcPad doesn't allow you to edit the related table like this, unless you want to do a severe (non UI) work around.
The simplest approach is to always activate the related table form (TABLEFORM) and then you can run your script while on the page. The related form is nested inside the layers form, like those russian dolls, so you must open one to get to the other. If you go down this approach you can use the ThisEvent.Object to get the reference of the TableForm and you can traverse the pages from there.
e.g. When you open the related table form:
Use the Page OnSetActive event > myRelForm = ThisEvent.Object.Parent
Then you can traverse the pages - ThisEvent.Object.Parent.Pages(...)
I hope this doesn''t muddy the waters too much.
Let me know how you go.
Cheers,
Gareth
The non UI approach is to use the layer DataSource object and update the underlying related table using SQL. This method has to update the AXF_ columns in the dataset as well.