Select to view content in your preferred language

Help on <TABLEFORM> element?

4106
12
02-02-2011 10:18 AM
AndrewZimba
Frequent Contributor
Why is there no help on this element in ArcPad Studio 10?  There's help on the <EDITFORM> element, on which <TABLEFORM> elements reside.  There's help on <PAGE> elements, which live on <TABLEFORM> elements.  But there is no help on the <TABLEFORM> element. 

I realize it's important to get products to market, but with incomplete help?  On long-awaited enhancements such as customizing related table forms?  C'mon ESRI ArcPad Team, get it together!!
Tags (3)
0 Kudos
12 Replies
RolfBroch
Frequent Contributor
Comboboxes support .clear to empty the combobox for all its values (not just make nothing selected).

Is it correct that you try to use a combobox called "cboSICCode"?

In your code that works you use "cboSICClass". Are we talking about two different comboboxes?

Secondly you can change the following code

Dim inPath, rsList
inPath = Preferences.Properties("DataPath") & "/"
Set rsList = Application.CreateAppObject("recordset")
Dim strSICClass
strSICClass = pCtrls("cboSICClass").Value
msgbox "cboSICClass = " & strSICClass <--so does this
pCtrls("cboSICCode").Clear <-- "class does not support automation" here
rsList.Open inPath & "SICCodes.dbf",1
rsList.MoveFirst
While Not rsList.EOF
If Left(rsList.Fields("CODE").Value, 2) = pCtrls("cboSICClass").Value Then
Call pCtrls("cboSICCode").Additem(rsList.Fields("DESCRI P").Value, rsList.Fields("DESCRIP").Value)
End If
rsList.MoveNext
Wend

with

pCtrls("cboSICCode").Clear
pCtrls("cboSICCode").Additemsfromtable Preferences.Properties("DataPath") & "\SICCodes.dbf", "DESCRIP", "DESCRIP", "Left(
, 2) = """ & pCtrls("cboSICClass").Value  & """"


again assuming that cboSICCode actually exists.

Rolf
0 Kudos
JasonTipton
Frequent Contributor
Ooooh. Yeah. This means that what I've been developing isn't going to work. That seems to be a very frequent feeling.

ESRI, you may want to take note:

Rolf is right. ComboBoxes do support .clear. The reason that I thought that they didn't is because I was trying to .clear a ComboBox inside a <TableForm> element.  Later I switched to just a normal form to build my other forms with the intention of moving them into a <TableForm> element. Of course, I did not use the .clear. Instead, I used the .ListIndex = -1. This seemed to work.... until I read Rolf's post.  I tried the .ListIndex = -1 inside a <TableForm> element. . .To my unsurprise, it does not work.

Here's my code:
console.print(ThisEvent.Object.Parent.Controls("Field1").ListIndex)

This works. It prints the .ListIndex

ThisEvent.Object.Parent.Controls("Field1").Clear

or
ThisEvent.Object.Parent.Controls("Field1").ListIndex = -1

These do not work. Error message:

Class doesn't support Automation
Source Text Unavailable

If you misspell your control, ex:
ThisEvent.Object.Parent.Controls("Fiel1").ListIndex = -1

Object Required
Source Text Unavailable

so it is a different message.

Again, this DOES WORK inside a <FORM> but the SAME CODE does not work inside a <TABLEFORM>.
0 Kudos
JamesNunn
Deactivated User
Is there any more information on accessing related tables since this thread started? How about the documentation update? Also relevant is the thread below

[HTML]http://forums.arcgis.com/threads/11435-Show-related-tables-as-part-of-selection-query?p=205611#post2...
0 Kudos