Hi List

It's one of those "wish I had another programmer looking over my
shoulder" problems.  I have a table of census domain field names, and
associated field captions, for use in a browse or combo, such that the
user can understand what the domains are, 

e.g. "HHWITH1CAR" goes with "Householder with 1 car".  
     "KIDSOFSCH1" goes with "Kids of school age"

I put these into an array of TYPE (c.f. 2-D array) via the code below.
But for some magic reason the array isn't getting filled with the
correct values.  e.g. the 1st element may have the 1st rec in the table,
but the rest may be a repetition of the the 2nd rec, or indeed just of
the 1st rec.

I can't see anything wrong with the code - can you?

Or is there something perculiar about type arrays?

'ppreciate it

Terry McDonnell
----------- code follows:

Dim I, lnNumRecs as SmallInt

Select * from MICenAPFld
  where AP_ID = tnAP_ID
  into csrCenAPFlds
  Order by AP_Fld_ID

lnNumRecs = TABLEINFO( "csrCenAPFlds", TAB_INFO_NROWS)
ReDim gaAPFlds( lnNumRecs)
ReDim gaAPFldCaps( lnNumRecs)
Fetch First From csrCenAPFlds
For I = 1 to lnNumRecs
  gaAPFlds( I).AP_ID            = csrCenAPFlds.AP_ID            '
Analysis profile ID
  gaAPFlds( I).AP_Fld_ID        = csrCenAPFlds.AP_Fld_ID        '
Analysis profile field ID
  gaAPFlds( I).AP_FieldName     = csrCenAPFlds.AP_FieldNa
  gaAPFlds( I).AP_FieldCapt     = csrCenAPFlds.AP_FieldCa
  gaAPFldCaps( I)               = gaAPFlds( I).AP_FieldCapt   ' Just the
field capt for user select combo
  gaAPFlds( I).AP_FieldCapt
  Fetch Next From csrCAPInstcs
Next


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 18368

Reply via email to